- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2024 02:49 PM
Hello -- this is meant to be a solution for anyone who runs into the same issue I just figured out. Hope this helps someone down the line!
Scenario: I have a record producer that creates a HR Case. The record producer has a Yes/No variable to indicate if travel is required. After the record producer is submitted, via the flow, I create a record on my Position table and set the value of the field "Travel Required." I have to script the condition in Flow Designer because it does not let me use data pills. The field is not recognizing my true/Yes selection and is therefore not posting correctly to the Position record.
Note: My "Travel Required" field is a Choice field on the Position table, but I will describe how to handle it if it were a Boolean (aka True/False aka checkbox) field as well.
In Flow Designer, for both true/false (checkbox) and choice values (yes/no), I do not have the option to use a data pill. (As opposed to using a reference field, where I can drag data pills.) Thus, I have to manually script it. I got confused because the record producer/catalog item variable and flow designer pill do not align:
The flow designer pill displaying as True/False confused me. I wasn't sure if I was supposed to check for a "Yes" value or for a "true" value or what. In the end, you check for a "Yes" value like this, and if you are setting a Choice field, you can just return the matching value:
//check Yes/No variables for a "Yes" value instead of "true" or === true
if (fd_data._1__get_catalog_variables.travel_required == 'Yes') {
return 'Yes'; //using a Choice field on the back-end with options "Yes" and "No"
} else {
return 'No';
}
Since my "Travel Required" field on the Position Table is a choice field (with options Yes and No) in the example above, I can return "Yes" -- but if my "Travel Required" field on the Position table was a boolean, like in the example below, I return true instead of "Yes" like this:
//check Yes/No variables for a "Yes" value instead of "true" or === true
if (fd_data._1__get_catalog_variables.travel_required == 'Yes') {
return true; //using a Boolean field (checkbox) on the back-end
} else {
return false;
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2024 02:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2024 02:49 PM
Solution in original post!