- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2016 05:06 PM
Is there a way of hiding a group name from "Assignment group" field on the Change form till the New Change reached "Scheduled" status ?
Reason for this is there is a group which only needs to be selected after all the approvals are done. This group in turn bridges with a 3rd party tool & selecting this group before the change is approved, would prematurely bridge the change request.
I know you can do this on a choice list but not sure on how to hide a value in a reference field.
Any input would help me here !!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2016 01:04 AM
Hi Suhas,
- No, you don't have to use a script include. For an advanced refqual, you can specify "javascript:" with any valid javascript statments following it, including a call to a script include. But you can also just insert your statements right there in the advanced refqual. The advantage to calling a SI is that you could call a much more complex script... the refqual field does have a finite length which limits the amount of code you can enter there.
- If you want to list the 9 groups (out of 10) all the time, and include the 10th group when state=scheduled, use the second refqual I gave you (replace the group name and the state value with whatever you need):
javascript:current.state==-15 ? "active=true":"active=true^name!=Infrastructure NSW";
One important thing to note, I see in your query you were using "nameNOTInfrastructure NSW", which I don't think is a valid query... which would explain why you are still seeing all of the groups. An invalid query condition is ignored and all records are returned.
Instead you should be using "name!=Infrastructure NSW".
Try that and see how it works for you.
Thanks,
-Brian

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2016 05:27 PM
Hi Suhas,
You can restrict the value based on reference qualifier. Please refer the below example 4.3.2 for reference.
Reference Qualifiers - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2016 05:34 PM
Thanks for the response. But can we also restrict the assignment group values based on State ? (only 1 new group value has to be added in the already populated group list)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2016 05:47 PM
Yes you can push the values from server based on the logic defined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2016 05:53 PM
Do I need to establish a relationship between the State field & the assignment field ? as the value of the state field would be driving the assignment group value ? Finding it a bit confusing heh