Not getting correct out while passing MRVS in JSON through script API in ServiceNow Flow designer

User205031
Tera Contributor

Hi All,

I have a catalog form with 1 variable set and passing 2 values:

 

User205031_1-1758785450699.png

 

Earlier I was passing 'ritm no' as a String type and using the below script I was getting output as 

User205031_2-1758785511523.png

 

Script :

User205031_0-1758785805387.pngUser205031_1-1758785822808.png

 

 

Now, I changed the 'ritm no' as reference type and passing it as input but while executing the script it is not giving me any output. Its shows an error:

User205031_3-1758785595132.png

 

User205031_4-1758785611079.png

 

Please advise what needs to be changed.

Thanks !

1 ACCEPTED SOLUTION

G Ponsekar
Giga Guru

Hi @User205031 ,

 

In your script, Line number 44, you are querying with RITM number. since you are passing reference record you need to query with RITM sys_id

 

If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!

 

Thanks, GP

View solution in original post

2 REPLIES 2

G Ponsekar
Giga Guru

Hi @User205031 ,

 

In your script, Line number 44, you are querying with RITM number. since you are passing reference record you need to query with RITM sys_id

 

If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!

 

Thanks, GP

Thanks ! It worked.