Calculate total count of sys_ids from a variable

Rooma1
Tera Contributor

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.

 

Rooma1_0-1709971479087.png

 

Rooma1_0-1709972604368.png

 

 

8 REPLIES 8

Sree Vasthava M
Tera Contributor

Hi @Rooma1 ,

 

I think it is sending only string value to array
so set the value which is received to string variable and convert it to array and find the length

@Sree Vasthava M Thanks for the suggestion. 

Just converted the array type variable to string type and calculated the length without converting it to array.

Snippet below:

 

Rooma1_0-1709978519845.png

 

 

Thanks,

Rooma

Sree Vasthava M
Tera Contributor

Hi @Rooma1 ,

 

To find the count of sys_id we need to split the string and add to an array and find the length for count

Hi Sree, Not sure how it is giving the count as expected without splitting it and adding to an array. But I am getting the expected results.

 

Thanks,

Rooma