How to access VariableSet's variables in Record Procuder Scripts.

sneha_chauhan
Tera Expert

I have a Variable Set (existing_printer) inside my record producer, I want to check value of a variable from variable set in my record producer script. I tried using producer.<variableSet_name>.<varibale_name> as below:

else if((producer.please_select_issue_description == "Break Fix/Issue") && (producer.existing_printer.what_type_of_department_printer == "HOD" ))
    {
        current.assignment_group.setDisplayValue('groupName');
}
 
1 ACCEPTED SOLUTION

sneha_chauhan
Tera Expert
Got the solution, below line of code is working:
producer.existing_printer[
0].what_type_of_department_printer == "HOD"
 
Thanks all for your quick response

View solution in original post

9 REPLIES 9

Mark Manders
Mega Patron

That should be the way to call  it. Can you add logging to see what it returns? 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Najmuddin Mohd
Mega Sage

Hi @sneha_chauhan ,

Even it's the value of a variable set,
we use, producer.variable_name, where variable name is the name of the variable set.



NajmuddinMohd_0-1724929980451.png





NajmuddinMohd_2-1724930096229.png

 

NajmuddinMohd_1-1724929998455.png


Hope this information helps you. Kindly mark it as Helpful and accept the solution!



Regards,
Najmuddin.

producer.variable_name is not working

Hi @sneha_chauhan ,
I believe the variable set you are using is Multi - row variable set.

My answer is single - row variable set.

Regards,
Najmuddin.