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  

label: "Manager",
labelPosition: "ADJACENT",
placeholderLabel: "--- Select a Manager ---",
value: ri!manager.name,
saveInto: ri!manager.id,
validations: {}


are there any better approach ?

Parents Reply Children

 Discussion posts and replies are publicly visible