How to retrieve an item bsaed on one field OR another

I have a data type in my app called “Constants” where I save constant values to be referred to elsewhere. One of the constants is LOOKUP_UNIQUE_IDENTIFIER, which can be either “uid” if I want to look a thing up by its field “uid” or “title” if I want to look a thing up by its “title” field. I want to be able to set up other workflows to use either of these two fields, based on what I set the Constants value to be, so that it’s resilient against my external data source having a bug.

I’m setting up a workflow where I want to look up a thing by either “uid” or “title” depending on the value of LOOKUP_UNIQUE_IDENTIFIER and then do further actions on it. I’m hoping to use the trick where you use a “Make change to a thing” action at the beginning of a workflow to be able to easily refer to that thing later in the workflow. Is there a way to express “look up a thing by this or that field” in one action? Or any other way to accomplish this logic?

You can merge two lookups and if you’re data is sound, it’ll return only 1. I have a feeling though ‘title’ won’t be unique and you’ll get back a list and won’t know which to choose.

1 Like