Use Flow Designer to Look Up Records on User Table with email.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2022 04:36 AM
Hi,
Got a strange one for you.
We have a flow in Flow Designer where we need to 'look up records' on the sys_user table by using an email address.
In the catalogue item the user enters the first and lastname of a person.
We then set a flow variable via a script that changes the inputs into our company format and adds the domain at the end. e.g. firstname.lastname@ourcompany.com
We then use the look up records to look on the sys_user table to see if the email is already taken. If it is then we add a count into the email address so firstname.lastname2@ourcompany.com. Then search again and if that exists add 1 to the count until we find a free address.
The problem we have is with the LookUp Records action not searching the email field properly.
if we write the email address in the search field it works fine.
but if we use a data pill which is a string it doesn't
We're assuming it's because the email field on the user table is an Email Type not a string.
Anyone any ideas how we convert a string to an email? we think we have to use the scripted condition bit but things we've tried haven't work.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2022 06:22 AM
Can you share an execution context of what the pill value looks like at runtime? That shouldn't be the issue and should work fine, I suspect the pill value is what is not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2022 01:35 AM
Hi.
The original pill type was a String but I've just made a subflow as you can set an output to an Email Type.
Which works and as you can see it sends the output called email back as a type Email.
I then do a look up records using the output from the subflow (type email).
but this still won't find any records.
and I know the email exists as it's mine and i've done a manual search of the table just to be sure.
So even using the correct pill type doesn't work.