Error: "fd_data" is not defined.,Detail: "fd_data" is not defined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 10:04 AM
Hello All,
I have a variale in my flow called "count" i'm trying to increment the count from previous actions using below script but i'm getting this error. but this was working fine yesterday.
Error: "fd_data" is not defined.,Detail: "fd_data" is not defined.
var count = 0;
if (fd_data._9__get_group_members.answer == true) { count++; }
if (fd_data._11__get_group_members.answer == true) { count++;}
if (fd_data._13__get_group_members.answer == true) { count++; }
if (fd_data._15__get_group_members.answer == true) { count++; }
if (fd_data._17__get_group_members.answer == true) { count++; }
if (fd_data._19__get_group_members.answer == true) { count++; }
if (fd_data._21__get_group_members.answer == true) { count++; }
if (fd_data._23__get_group_members.answer == true) { count++; }
if (fd_data._25__get_group_members.answer == true) { count++; }
if (fd_data._27__get_group_members.answer == true) { count++; }
return count;
Thank You!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 10:15 AM
Is "Get Group Members" a custom action? And is it really returning an "answer" variable that is true/false? It's hard to see the issue from just this information. Perhaps if you showed some screen shots of your flow, the action's return info, and where you are using this code, that might help?
Also, what version of ServiceNow are you using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 10:24 AM
Hi @JenniferRah ,
Yes, "Get Group Members" is custom action where i'm passing group id and username of requested for user.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 10:30 AM
What we need to see is if that action is passing a True/False variable called "answer", because that's what your code is looking for. If you can look at your execution details and verify that is getting created and the value is really true or false, that will be a starting point. Also, is that the entire error message, or is there more information?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 10:34 AM
Hello @JenniferRah
That's the entire error. and entire flow is working as expected sometime but sometimes it's throwing error.