Calculate total count of sys_ids from a variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2024 12:05 AM - edited 03-09-2024 12:23 AM
Hi All,
I want to calculate the count of sys_ids which is getting returned but i am unable to do so as my script is not working. Can soemone please help me to rectify my script. Below the snippet from the script and logs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2024 12:23 AM
Hi @Rooma1 ,
Remove the .split() function n just use .length.
That will give u the correct output. As the variable is already an array so u don't need to split by comma in order to get the length. Directly use .length
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2024 12:28 AM
@Danish Bhairag2 Thanks for the suggestion. I used .length but it is calculating only one sys_id but it should count 4.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2024 12:39 AM
Hi @Rooma1 ,
Could u please try arrayvariable[0] in logs n tell me wht value u getting?// use ur variable name in place of array variable.
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2024 12:43 AM