Possible to change a choice field's reference qualifier based on another field's value?

C_dric Chen
Tera Contributor

(Rant: ServiceNow isn't that "low-code" at all...)

Greetings.

find_real_file.png

I'm trying to configure the "Department" and the "Project Lead" fields in such a way that the selection in the "Department" field would determine the user that can be selected in the "Project Lead" field.

  • There're only two departments: "PPP" & "CGR". (I thought about using the "Assignment Group" field that comes with the extended "Task" table, but I can't even configure the reference qualifier on the scoped dictionary entry.)
  • When "PPP" is selected in the "Department" field, only users who are in the "PPP" department would be available for selection in the "Project Lead" field.
  • When "CGR" is selected in the "Department" field, only users who are in the "CGR" department would be available for selection in the "Project Lead" field.
  • As for the departments, I've added them to the users' profiles and created the corresponding groups and roles for them.

Would this be possible?

1 ACCEPTED SOLUTION

Allen Andreas
Administrator
Administrator

Hello,

ServiceNow didn't say that everywhere in the platform it's low-code/no-code.

There are other interfaces for this, such as App Engine Studio, Flow Designer, etc.

In any case, you can use a reference qualifier on the Project Lead field that can use the department value (if that value is properly setup to be the sys_id of the department chosen), then the reference qualifier can be:

javascript:"department="+current.field_name;

field_name would be the field name for your department field on the form, again, this works when the department selection results with a value of a sys_id.

And to circle back to low-code/no-code, the above, is extremely minimal code either way.

There's a difference between low-code/no-code and then just not fully knowing the tools and how to use them.

Please mark reply as Helpful/Correct, if applicable. Thanks!

 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

3 REPLIES 3

Allen Andreas
Administrator
Administrator

Hello,

ServiceNow didn't say that everywhere in the platform it's low-code/no-code.

There are other interfaces for this, such as App Engine Studio, Flow Designer, etc.

In any case, you can use a reference qualifier on the Project Lead field that can use the department value (if that value is properly setup to be the sys_id of the department chosen), then the reference qualifier can be:

javascript:"department="+current.field_name;

field_name would be the field name for your department field on the form, again, this works when the department selection results with a value of a sys_id.

And to circle back to low-code/no-code, the above, is extremely minimal code either way.

There's a difference between low-code/no-code and then just not fully knowing the tools and how to use them.

Please mark reply as Helpful/Correct, if applicable. Thanks!

 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

It works!

Thank you very much.

Marc Mouries
ServiceNow Employee
ServiceNow Employee

The no-code answer exists. Click "Use dependent field" as shown below and then select the field to filter on.

find_real_file.png