Need to create a dynamic milestoneField

Hi Team,

I'm having a requirement to make the below milestone object to Dynamic. 

Here 

Not Assigned, InProgress, Completed are fetching from one table and Review, Rejected are fetching from another table.

The milestone object should be like below. Please help me 

Thanks in advance

  Discussion posts and replies are publicly visible

Parents
  • Hi Harris,

    Please try the code snippet provided below and you should be able to generate what you are trying to do.

    a!localVariables(
      local!stepsFromTable1: rule!getStepsFromTable().data,
      local!stepsFromTable2: rule!getStepsFromAnotherTable().data,
      local!milstoneSteps: a!forEach(
            items: {
                local!stepsFromTable1.label,
                local!stepsFromTable2.label
            },
            expression: {
                stepId: fv!index,
                stepName: fv!item
            }
        ),
      local!activeStep: 1,
      {
        a!milestoneField(
          label: "Milestone",
          labelPosition: "ABOVE",
          steps: local!milstoneSteps.stepName,
          links: {},
          active: local!activeStep
        )
      }
    )

    What I have tried to do here is get the data from two different tables and combine them in one dictionary. That way, each step has a unique if, and then you can refer to that dictionary any time if you want to see what is the name of the active step.

    Thanks,
    Harshit 

Reply
  • Hi Harris,

    Please try the code snippet provided below and you should be able to generate what you are trying to do.

    a!localVariables(
      local!stepsFromTable1: rule!getStepsFromTable().data,
      local!stepsFromTable2: rule!getStepsFromAnotherTable().data,
      local!milstoneSteps: a!forEach(
            items: {
                local!stepsFromTable1.label,
                local!stepsFromTable2.label
            },
            expression: {
                stepId: fv!index,
                stepName: fv!item
            }
        ),
      local!activeStep: 1,
      {
        a!milestoneField(
          label: "Milestone",
          labelPosition: "ABOVE",
          steps: local!milstoneSteps.stepName,
          links: {},
          active: local!activeStep
        )
      }
    )

    What I have tried to do here is get the data from two different tables and combine them in one dictionary. That way, each step has a unique if, and then you can refer to that dictionary any time if you want to see what is the name of the active step.

    Thanks,
    Harshit 

Children
No Data