- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2020 01:37 AM
Hi,
i am not sure why this error in coming and how can we remove it. is there any other way to call if condition please let me what have i done wrong. PFB screenshot for reference.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2020 02:45 AM
Hi,
try adding logs
if (gr.next()) {
var obj = {};
obj["Number"] = gr.number + '';
obj["State"] = gr.state.getDisplayValue();
gs.info('state'+gr.state.getDisplayValue());
if (gr.state.getDisplayValue() == 'In progress') {
obj["Sub state"] = gr.hold_reason.getDisplayValue();
}
inc.push(obj);
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2020 02:45 AM
Hi,
try adding logs
if (gr.next()) {
var obj = {};
obj["Number"] = gr.number + '';
obj["State"] = gr.state.getDisplayValue();
gs.info('state'+gr.state.getDisplayValue());
if (gr.state.getDisplayValue() == 'In progress') {
obj["Sub state"] = gr.hold_reason.getDisplayValue();
}
inc.push(obj);
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2020 11:51 PM
Any update on this?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2020 08:56 AM
Apologizes for the delay Ankur and thanks a lot for the help it worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2020 09:12 AM
You are welcome
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2022 09:16 PM
Tips to Fix Formula Parse Errors
Check your formula inputs and make sure they're correct.
Use the IFERROR function and display a different result if an error occurs.
Check your spelling and make sure all the parentheses are in the right places.
Make sure you're using the correct operators.
Regards,
Rachel Gomez