Appian Community and Appian Academy are being upgraded. As a part of the upgrade, Appian Community is currently in read-only mode, and user registration is disabled until August 3. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

What is the best way to populate a dropdown ?

I need the managers list while adding an employee . i have an employee and manager table . 

while creating an employee , i need to populate managers list so that HR can assign the manager to an employee . in the interface i need to populate the Manager dropdown .

 

Option 1 

 

--Create a query entity to fetch all the managers 

--get the data subset 

-- initialize local!managers:rule!getManagers()

and display like below  

a!dropdownField(
label: "Manager",
labelPosition: "ADJACENT",
placeholderLabel: "--- Select a Manager ---",
choiceLabels:{index(local!managers.data,"name")},
choiceValues:{index(local!managers.data,"name")},
value: ri!manager.name,
saveInto: ri!manager.id,
validations: {}
)

 

are there any better approach ?

  Discussion posts and replies are publicly visible

Parents
  • As Josh mentioned, it depends on the approach and use case. In case of Data centric approach, user experience is same even though I would store the data in process and pass the list in as a rule input.
    Again if we have multiple drop downs based on the selection, then we need to fetch the data in the form itself.
    As per best practice, i would recommend store the data in process and pass the list in as a rule input.
    Correct me if i am wrong.
Reply
  • As Josh mentioned, it depends on the approach and use case. In case of Data centric approach, user experience is same even though I would store the data in process and pass the list in as a rule input.
    Again if we have multiple drop downs based on the selection, then we need to fetch the data in the form itself.
    As per best practice, i would recommend store the data in process and pass the list in as a rule input.
    Correct me if i am wrong.
Children