To use this function, you’ll need a Child FLO that performs the test on each item, one at a time. Define fields on the event card that will be the inputs that you’ll use to determine whether or not the item is a match. At a minimum, you’ll need a field for the item from the list (which you can name whatever you want). Then build the rest of the child FLO, ending with a Return card with a single field of type True/False.
Calling a child FLO allows you to do tests of any complexity (e.g. given a list of email addresses for a particular customer, you could look up to find the first one that already exists in your marketing database).
Fill out the Find card as follows:
- list: The list you want to search
- flo: The child FLO (as described above) that will be called once for each item in the list, until a match is found
- with the following values (dynamically generated):
- item: (will have whatever name you chose when you created your child FLO) Click in the field that will hold the current item from the list and choose “Item.” (Or, in some instances, you may also be able to select a specific path within an object if only that value is needed from each item.)
- You can have optional additional fields on the child FLO event card in child FLO you chose, and those will also show up as input fields.
- item: The first item in the list that results in the child FLO returning
True. Make sure to set the type of _item_ to match the type of the list.
- index: The location of the found item in the original list, where 0 is the first item in the list. Returns
-1if there is no match.
If list is
[2,4,12,7,3,8] and _flo_ is set to a child FLO that returns
True if a number is an odd number, and Item is passed to the child FLO’s input, then the output _item_ is
7 (the first item in the list where the child FLO returns
True) and index is