Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to create form

aggarwaltan
Tera Contributor

I want to create a form with 3 variables only, where in 

1st. Variable (User Role) having multiple choices which can be selected multiple times 

2st. Variable(User department) having multiple choices which can be selected multiple times 

3rd. variable (Evn) which has a radio button for prod/uat one. 

How can I create this? I used a label and a checkbox that one is not good please provide me a solution. 

3 REPLIES 3

AnjalPDijo
Mega Guru

Hi @aggarwaltan ,

For your requirement:

 
  • User Role: Use a List Collector variable and set the Type Specification to reference the sys_user table. This allows selecting multiple users easily.

  • User Department: Use another List Collector variable and set the Type Specification to reference the cmn_department table.

  • Environment (Evn): Use a Multiple Choice variable type and add choices like:

    • prod → Production
    • uat → UAT
      This will render as radio buttons, ensuring only one environment can be selected.

Hope this helps!

Hi @aggarwaltan ,

You need to configure like below- 

1. User Role- 

  

Create variable

Type = List Collector

Table = sys_user_role

Filter = active = true

 

2.User Departement

 

Create a variable

Type = List Collector

Table = cmn_department

Add optional filter: active = true

3.for Env- 

 

Create variable

Type = Multiple Choice

Under "Type Specification", set:

Single Choice = Yes

Choice Display Type = Radio Buttons

Add choices:

Prod

UAT

 

If you found my response helpful, please mark it as helpful and accept it as the solution.

Thank you
Nawal Singh

Deepak Shaerma
Kilo Sage
Kilo Sage

hi @aggarwaltan 

1. Variable: User Role (Multi-Select)

 

Use a List Collector pointing to the Roles table.

Type: List Collector

Question: User Role

Name: user_role

Type Specifications Tab:

List Table: Role [sys_user_role]

Variable Attributes: glide_list

Why this attribute? Without it, you get a large "Slushbucket" (two boxes with left/right arrows). With glide_list, you get a modern, sleek input field where you can type and select multiple tags (looks like the "To:" field in an email).

 

2. Variable: User Department (Multi-Select)

 

Use a List Collector pointing to the Department table.

Type: List Collector

Question: User Department

Name: user_department

Type Specifications Tab:

List Table: Department [cmn_department]

Variable Attributes: glide_list

 

3. Variable: Env (Radio Button)

 

To get a Radio Button (circles where you can only pick one), do not use "Select Box". Use the specific type designed for this.

Type: Radio Button

Question: Environment

Name: env

Question Choices (Related List at bottom):

    1. Text: Prod | Value: prod
    2. Text: UAT | Value: uat

Type Specifications Tab:

Select specific line layout: Checked (This makes them appear side-by-side horizontally, which usually looks better than a vertical list).
Note: Please Mark this Helpful and Accepted Solution. If this Helps you to understand. This will help both the community and me..
- Keep Learning ‌‌
Thanks & Regards 
Deepak Sharma