We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Display Multi Select Options and capture selected values in Ticket description

GaneshErike
Tera Expert

Hi Team,

I have a requirement in a Record Producer and need guidance on the best approach.

 

Requirement

In a Record Producer form, I need to display:

  • A label like: “Please select roles”
  • Under this label, I need to display 30 role options
  • The user should be able to select one or more role options
  • These role options are static (not stored in any ServiceNow table)

After the user submits the record producer:

The selected roles must be captured and shown in the created ticket’s Description field (Incident/Request)

 

Please let us know your valuable suggestions.

 

Thanks in advance.

2 ACCEPTED SOLUTIONS

Dinesh Chilaka
Tera Guru

Hi @GaneshErike ,

1.Create a variable of type Select Box  and define all your roles as the individual question choices for that variable under the Question Choices Related List.

2.Now Change the variable type to List Collector , here select the table name as question_choice  and add the reference qualifier as the 

javascript : 'question=sysIdOfTheQuestion'

Open the question_list table search for the record with Question as name of your variable and copy that record sysId and paste that sysId in the reference qualifier.

Now it will works as expected.

If my response finds helpful, please mark as helpful and accept the solution.

View solution in original post

@GaneshErike ,

You can simply use the following code in the record producer script field,

current.description = producer.getDisplayValue('selec');

Here replace selec with your variable name.

If my response finds helpful, please mark as helpful and accept the solution.

View solution in original post

8 REPLIES 8

Dinesh Chilaka
Tera Guru

Hi @GaneshErike ,

1.Create a variable of type Select Box  and define all your roles as the individual question choices for that variable under the Question Choices Related List.

2.Now Change the variable type to List Collector , here select the table name as question_choice  and add the reference qualifier as the 

javascript : 'question=sysIdOfTheQuestion'

Open the question_list table search for the record with Question as name of your variable and copy that record sysId and paste that sysId in the reference qualifier.

Now it will works as expected.

If my response finds helpful, please mark as helpful and accept the solution.

Hi @Dinesh Chilaka ,

 

It worked, thanks for your help.

Please let me know how I can track which options are selected in ticket description.

 

Thanks

@GaneshErike ,

You can simply use the following code in the record producer script field,

current.description = producer.getDisplayValue('selec');

Here replace selec with your variable name.

If my response finds helpful, please mark as helpful and accept the solution.

CarstenA
Giga Contributor

This is a clear and well-outlined requirement. One approach could be using a multi-select choice variable in the Record Producer and then scripting a business rule or client script to capture the selected values and append them to the ticket’s Description field. Has anyone tried this with purely static options before?