- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 03:08 AM
Hi,
I am getting a list of sys id's from other activity in workflow. Now if i have null value i want to exclude those null values.
98c80b450a0a3d28008a03e6a8d687td,null,87d80b450a0a8jud708a03e6a8d687td
With the response i am generating an approvers by just pushing these sys id's and it is generating approvers but since i have null value it is generating approve with empty record.
Can anyone please help how to exclude if i get null value in the list of sys ids
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 03:29 AM
Hi shaik,irfan,
If this is just a comma seperated string where the null is sometimes part of the string just remove then nulls with the standard javascript string replace function, take the comma's into consideration, like this: (not tested it)
var str = "98c80b450a0a3d28008a03e6a8d687td,null,87d80b450a0a8jud708a03e6a8d687td";
var res = str.replace(",null", "");
Put your entire string you have in the str variabel, and the variable 'res' replaces a leading comma and 'null' with nothing, should do the trick!
If you think my answer put you in the right direction or you appreciated my effort, please mark the response as Helpful (👍). That way other people in the community will probably be triggered to read the responses too. If my answer solved your issue, please mark my response as Correct (✅). In the list of question people like me that want to help out will know your question was already answered and others that are curious to the answer know a good answer is given in the thread.
Thanks in advance! Good luck!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 03:29 AM
Hi shaik,irfan,
If this is just a comma seperated string where the null is sometimes part of the string just remove then nulls with the standard javascript string replace function, take the comma's into consideration, like this: (not tested it)
var str = "98c80b450a0a3d28008a03e6a8d687td,null,87d80b450a0a8jud708a03e6a8d687td";
var res = str.replace(",null", "");
Put your entire string you have in the str variabel, and the variable 'res' replaces a leading comma and 'null' with nothing, should do the trick!
If you think my answer put you in the right direction or you appreciated my effort, please mark the response as Helpful (👍). That way other people in the community will probably be triggered to read the responses too. If my answer solved your issue, please mark my response as Correct (✅). In the list of question people like me that want to help out will know your question was already answered and others that are curious to the answer know a good answer is given in the thread.
Thanks in advance! Good luck!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 03:38 AM
That works perfect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 04:13 AM
Good to hear, cheers!