Skip to main content
Known Participant
Jun 10, 2021 7:24 AM UTC
Question

assign task to a group in the dropdown field value

hello im new to appian,

is there a way to assign a task to a group base on the value of groups in the dropdown ?

i try using groupsByName function on the process model in the scriptask to get the specific group that i selected on the dropdown field but im unable to set the task assignment on that group

Thank you very much 

13 replies

stefanhelzle0001
Brainy
Jun 10, 2021 8:05 AM UTC

Did you try a group picker field?

In the form you need a rule input of type group, map this to a process variable and use the for assignment.

In case you want to store assignee in a data type, use an integer field.

Does that help?

BTW, group names are not unique. Always reference groups by their id.

Known Participant
Jun 10, 2021 8:19 AM UTC

hello stefan thank you for your answer. is it possible to set choice values for the group picker field so that the user can only select the groups needed ? 

stefanhelzle0001
Brainy
Jun 10, 2021 8:22 AM UTC

Sure. Define a local variable with the list of groups. Can be constants. Create a second local variable to hold the labels created with a foreach and the group() function. Then use these for choiceValues and choiceLabels.

Local variables make sure that this lists are not re-evaluated on each user interaction.