Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

record producer

Shir Sharvit
Tera Contributor

Hey.
Would appreciate help..
I created a record producer:

ShirSharvit_0-1701785256799.png

 

I created a caller_id variable that refers to the sys_user (User) table:

ShirSharvit_1-1701785316121.png

 

My script include:

ShirSharvit_3-1701785799917.png

 

And then I used the Reference qualifier and calling in my script include when i call the caller_id i get undefined:

ShirSharvit_2-1701785520385.png

 

 

Why the script return undefined?

 

Thank. Shir

 

 

 

10 REPLIES 10

Hello @Shir Sharvit ,

 

In your reference qualifier can u pass "current.variables.caller_id" instead of current.caller_id

 

Thanks,

Danish

 

 

The task is that as soon as I select a caller in the record producer form, I need it to return the list of the caller's position
I put all the values in the array but it doesn't return all the values.

I added the line so that it returns all the values in the array and it doesn't work:


return "sys_idIN" + positionsArray.join(',');

@Shir Sharvit 

i got it in the reference qualifier did we try with this?

current.variables.caller_id

 

 

 new global.PositionForRecordProducer().refinePosition(current.variables.caller_id);

 

 

Thanks,

Danish

 

Yes I changed and it still shows me only one value in the array

 

ShirSharvit_0-1701790326612.png

 

It shows exactly the same value twice

 

ShirSharvit_2-1701790397872.png

 

Hi @Shir Sharvit ,

 

Did u check in the backend table the position value for the caller id value is how many? Your script looks good only. Can u tell me wht is in the backend table for the caller id selected

 

Thanks,

Danish