DropDown value with expression rule

Hi!

As my requirement i need to queryRecordtype .
Based on the results of a query using an expression rule in the interface dropdown
I would like to select id when name is selected as shown in the image below.

Thanks

  Discussion posts and replies are publicly visible

Parents Reply
  • Certified Senior Developer
    in reply to spykid

    Simply index the name for the choice labels and ID for the choice values.

    a!localVariables(
      local!data:rule!DATA_ExpressionHere(isActive: true),
      local!val,
      a!dropdownField(
        placeholder: "Select",
        choiceLabels: index(local!data,'recordType!recordType.fields.label',null),
        choiceValues:  index(local!data,'recordType!recordType.fields.id',null),
        saveInto: local!val,
        value: local!val
      )
    )

Children