How to Script Look Up Condition in Flow Designer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2019 10:12 AM
Hey y'all - I need help scripting a condition within the Look Up Action in Flow Designer, as I've never done so before. I have two custom tables: Establishments and Transactions (it's an app for personal budgeting). The goal with the flow is that when a new Transaction is created, we find the matching Establishment and auto-set that Reference. To do so, it uses a Look Up Action, scanning through the Establishments, looking at a field called "Import Name."
This flow partially works: if the Import Name is a perfect match, all things are good (see picture below). However, if I put the Import Name has some code for the specific franchise or whatnot, for the Establishment, I put the prefix. For example, Target's format is "TARGET #XXXXX" so for the Establishment, I just put "TARGET." The Establishment's Import Name will always be the same or shorter than the Transaction itself.
So (TL;DR) I need to write a condition for my Look Up Action that looks through the Establishment table and validates "if the current Establishment's Import Name is the start of the trigger Transaction's Import Name, that's the correct one." Obviously, can't do that with the data picker. Please help! Thanks!
- Labels:
-
flow designer
-
Workflow

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2019 01:34 PM
This is untested, but I'd suggest trying by hitting the F(x) button on the condition and trying something like: (Note I haven't verified the field names, but you access the objects by utilising the fd_data.trigger object, there's decent Intellisense on this query builder to help you out too).