Use Flow Designer to Look Up Records on User Table with email.

Andrew Jordan1
Tera Contributor

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.emailsearch-work.png

but if we use a data pill which is a string it doesn't emailsearch-notwork.png

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.

2 REPLIES 2

Elijah Aromola
Mega Sage

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.

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. email pill.png

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).

email records.png

but this still won't find any records. 

email lookup.png

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.