I have a requirement to show Form section called self serv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have a requirement to show Form section called 'self -serv' this Form Section to be shown when a Variable called Portfolio(reference field) on Demand table is set to 'MAC' if it is not set to MAC it should be hidden
Since Portfolio is a Reference field i have written a system property to store it and then written it in a Display BR and called it in a Client Script
Client Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
you are not comparing the field value
Update as this if it's a field
var gr = gs.getProperty('1234rrfvjdfghj');
g_scratchpad.isValid = current.demandField == gr;
update as this if it's a variable on your form
var gr = gs.getProperty('1234rrfvjdfghj');
g_scratchpad.isValid = current.variables.demandVariableName == gr;
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
it is not getting into else condition
even if the Portfolio is not MAC even then the section self serve is showing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
So what debugging did you do?
what are the results of that debugging?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader