How to script name value pair in Flow Designer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2023 01:58 PM
I need some help getting a value from a name/value pair variable in a Look Up Record action in Flow Designer.
My flow is triggered from an inbound email, which is used to submit a catalog item.
Since you can't parse the body of an email in flows I used Ben Scherer's "Parse Email Flow Action" action, which works great. However, it parses the UserID field in the body of the email as a string and on the catalog item the corresponding field is Requested for, which is a reference field and the Submit Catalog Item Request action won't allow me to use the UserID variable in the Requested for field.
I though I could solve the problem by doing a Look Up Record action before submitting the catalog item to get the user sys_id, but I'm not sure how to script it. Can anyone help me with that?
Here's what I have available to use for the script:
To use the Email variables to submit the catalog item, you have to use the name/value function:
But, I can't access the value in the email variable using a function in the Look Up Record action:
So I thought I would script it instead - and that's where I'm stuck. This is as far as I get. How can I get the value so that I can return the sys_id to set the Requested for in the Submit Catalog Item Request action?
Here's the flow:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
you can use by this
var attachment = {};
var name=fd_data.trigger.current.file_name;
var value=fd_data.flow_var.url;
attachment[name] = value;
return attachment;
