cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EC_1
Helper III
Helper III

Lookup in a table and send an email with the data

I'm creating  formula that Lookups for a value in a table and it return thta value in an email

The formula should read the TextInput, then look in the table for that "Name" and if it is true, send an email with the User and Password

LookUp(
'[dbo].[Usuario]',
IsMatch(
TextInput1_14.Text,
"",
MatchOptions.Contains
),
Office365Outlook.SendEmail(
User().Email,
"Recuperar Contraseña",
User
)
)

2 REPLIES 2
v-yutliu-msft
Community Support
Community Support

Hi @EC_1 ,

Do you want to check whether the table contains the data in the textinput, if it contains, then send an email to current user?

Could you tell me the field's data type that you want to filter based on the textinput?

I assume that it is text type ,then try this formula:

If(!IsEmpty(Lookup([dbo].[Usuario]',TextInput1_14.Text in fieldname)),
   Office365Outlook.SendEmail(
                              User().Email,
                              "Recuperar Contraseña",
                               email body
                              )
)

//please replace fieldname with the field that you want to filter based on.

If you filter data, you need to specify the field name.

If there's record meeting the requirements, the !IsEmpty()function will return ture, then the sendemail action will act.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

What i'm trying to do is to recover the user password

I have a User and Password validation where the formula validate if the user and password are valid
but i add a button to recover the password and I need that the formula Lookup in the SQL Table the Name of the user and if it matches it will send an email with the user and password
i have 4 columns in the table
User
Password
Name
Last Name

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,379)