- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2022 12:10 PM
Hello,
I am currently working on an action script in the flow designer where I want to dot walk to either the RITM table or a custom table based on which reference field is filled out on a form. The problem I am running into, is that when I check the value of these reference fields in my script, I get the error:
ConversionError: The undefined value has no properties.
I have tried using .getValue() as well as .nil() to check these reference fields, but still get the error. Is there a way I can write my script where I can check whether a reference field is blank or not without getting this error?
See script below:
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2022 07:49 AM
I figured it out. Simply using the following code without operators will return true or false if the reference field is filled out.
if(inputs.pmd.requested_ritm)
if(inputs.pmd.move_scenario)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2022 01:01 PM
Hello Andrew,
Please use below 2 templates to generate the required value.
fd_data.trigger.request_item.variables.<variable name>.getValue();
fd_data.trigger.request_item.variables.<variable name>.getDisplayValue();
Please advise if this works.
Regards,
Abhinay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2022 07:20 AM
Hello Abhinay,
To clear some stuff up, what I am working with here is a scripted action in a flow (so fd_data.trigger won't do anything for me). I have a table with 2 reference fields to sc_req_item and another custom table. I want to be able to check if either of these reference fields are blank, but when I try and reference one that is blank to check, I get the error "ConversionError: The undefined value has no properties." What I am trying to figure out is how can I check if these reference fields are blank without getting this error when they are. The code in question from my screenshots are those in the if statements.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2022 07:49 AM
I figured it out. Simply using the following code without operators will return true or false if the reference field is filled out.
if(inputs.pmd.requested_ritm)
if(inputs.pmd.move_scenario)