I have gone through some of the articles available, and can't seem to find a definitive way of populating a Screen Drop Down field with a pre-populated list.
I have a view of the HR system's table with user data, from this, I want to select a distinct set of values to present on a screen for requesting additional access. The task is driven by three fields, Cost Centre, Cost Centre Manager and the Role.
The data needs to be available at the start of the Task.
Writing the business logic in 'getOptions()' JS function of dropdown should help.
There is no default out of the box way to use SQL data in a screen dropdown.
I would like to add to what Sumeet and Jennifer suggested. It would it make it much more simpler for you.
var roles = FieldContext.getFieldValue("|attr1|");
P.S.: Please make sure |attr1| contains pipe delimited string of options.
Thank you for all the assistance. I was able to deploy the field as required.
I am glad it worked for you.