
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2015 04:49 AM
Hi Everyone
Can somebody help me with the Javascript below?
I have three variables on the record producer: category, sap_application, tor_infrastructure
When the user selects in category SAP than he can choose from the variable sap_application the related SAP Module. The same for the other variable.
Everytime the record producer is executed it runs through the outer default statement: gs.log("inside last default");
Or is there a better way to achieve this? I think I can't use assignment rules on a record producer?
Thank you very much
Christina
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2016 06:53 AM
This is an old thread, but I just ran into this issue and its resolution.
It appears that the variable type is not a string when getting the value from the producer variable.
EX:
var x = producer.u_variable_name; //Not a string
So if you convert to a string:
var x - producer.u_variable_name.toString(); //Is a string
it will resolve the issue and the Switch will work as intended.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2015 02:23 AM
Hi Christina.
I had the same problem with a Multiple Choice field (choiseWhat)
Solution: switch (producer.choiseWhat.getDisplayValue ())
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2016 06:53 AM
This is an old thread, but I just ran into this issue and its resolution.
It appears that the variable type is not a string when getting the value from the producer variable.
EX:
var x = producer.u_variable_name; //Not a string
So if you convert to a string:
var x - producer.u_variable_name.toString(); //Is a string
it will resolve the issue and the Switch will work as intended.