- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 10:36 AM
Our team uses record producers to create standard and normal changes from our service portal. I'm curious if after that process has taken place, are those record producer variables still able to be accessed to use in decision making?
Ex. Let's say we had a record producer asking the following questions:
1. "Do you enjoy soccer?" - u_soccer (Yes/No)
2. "Do you enjoy golf?" - u_golf (Yes/No)
Now let's say that I mapped the responses to the description field for whomever is working the change in question to see how they answered; However, if they answered 'Yes' to question 1, I'd like to kickoff a specific task to our soccer division to contact the user for a more targeted conversation.
Is it even possible for me to dive into the record producer's variables / responses to know that or would I have to make some kind of hidden field on the Change form 'Soccer' (Yes/No) and then set that field on the record that was created to determine that? I'm really hoping that I don't have to generate hidden fields because in alot of our change processes we want to use this kind of decision making.
Thanks.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 12:04 PM
What's the error message say?
Your if activity condition script should look like this:
answer = ifScript();
function ifScript() {
if (current.variables.u_database_retire == 'Yes') {
return 'yes';
}
return 'no';
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 12:04 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 12:14 PM
That was it.. I had accidentally left off the answer = ifScript();
Some days man.. some days....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 12:15 PM
Yea! Ignore my previous post!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 01:23 PM
I'm right there with you. The phrase "We learn from our mistakes" means that I've learned so much because I've made so many mistakes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 12:14 PM
Hello Joshua,
Chuck is giving you excellent advice and I hesitate to jump in because I'm just going to reiterate what he said. But I'll do it with a specific example from a workflow.
Maybe this will help? The following image shows an if statement which decides is a given task will run. This should be very close to what you want to do with a subflow.
The IF block has the following code to make the decision:
Notes #1: I have a gs.log statement too show the value of the variable
#2 Check the name of your variable, they won't start with "u_" unless you specifically named it that way.
#3 Finally, make sure you include the "answer = ifScript() command!
#4 If any of this helps, be sure to make Chuck's reply as Correct. He is the original source of this advice.
answer = ifScript();
//
function ifScript() {
gs.log("DB-DECOM: if mod_rep_con_checks = " + current.variables.mod_rep_con_checks);
if (current.variables.mod_rep_con_checks == 'true') { return 'yes'; }return 'no';
}