cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

FIND function to get email address from a string

Hi all,

 

I have a record in a table which has various emails connected in a string with  a ';' in between each email address.

 

ie.  example@microsoft.com;example@gmail.com

 

I am wanting to show an icon, only to users who have their email listed in this string,  thought I would be able to use the find function but cannot get this to work - Any thoughts?

 

This is what I have tried...(as well as various other ideas i cant get it to work. ) 

 

 

 

If(User().Email=(Find(User().Email,LookUp(CustomerCareAppDefaults,Title="1",AdminEmail),1,true)

 

 

 

The string of emails is located in the AdminEmail record where Title = "1"

 

Any thoughts?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: FIND function to get email address from a string

Hi @d3ell ,

Do you want to check if the current user's email is existed in the email string?

 

Based on the formula that you mentioned, I think there is something wrong with it. Please consider modify your formula as below (set the OnVisible property of the Icon to following😞

If(
   IsBlank(
            Find(
                 Lower(User().Email),
                 Lower(LookUp(CustomerCareAppDefaults, Title = "1", AdminEmail))
            )
   ),
   false,
   true
)

 

In addition, you could also consider take a try with the following formula:

If(
   Lower(User().Email) in Lower(Trim(Split(
                                LookUp(CustomerCareAppDefaults, Title = "1", AdminEmail), 
                                ";"
                          ).Result)),
   true,
   false
)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

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

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: FIND function to get email address from a string

Hi @d3ell ,

Do you want to check if the current user's email is existed in the email string?

 

Based on the formula that you mentioned, I think there is something wrong with it. Please consider modify your formula as below (set the OnVisible property of the Icon to following😞

If(
   IsBlank(
            Find(
                 Lower(User().Email),
                 Lower(LookUp(CustomerCareAppDefaults, Title = "1", AdminEmail))
            )
   ),
   false,
   true
)

 

In addition, you could also consider take a try with the following formula:

If(
   Lower(User().Email) in Lower(Trim(Split(
                                LookUp(CustomerCareAppDefaults, Title = "1", AdminEmail), 
                                ";"
                          ).Result)),
   true,
   false
)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

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

View solution in original post

Highlighted
Helper V
Helper V

Re: FIND function to get email address from a string

Hi @v-xida-msft 

 

Thanks for your help, I can confirm that the following worked,

If(
   IsBlank(
            Find(
                 Lower(User().Email),
                 Lower(LookUp(CustomerCareAppDefaults, Title = "1", AdminEmail))
            )
   ),
   false,
   true
)

 

and its now in my app.  

 

I'm struggling though to work out why it wouldn't work without the IsBlank and Lower Function, could you advise why this is?

 

the text in all the sources is lower case anyway so it shouldn't need to convert it and there isnt a possibility of this being Blank, i have tried the following, (which is basically the same but removing the IsBlank and Lower functions), but it doesnt work.

If(Find(User().Email), LookUp(CustomerCareAppDefaults, Title = "1", ReportRecipients), false, true )

I know that I have a solution, but in order to get better at PowerApps i'm trying to understand why these are required so that i will hopefully need less help moving forward!

 

Thanks 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,934)