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

Validate email address availability

Dear All,

 

I am automating email id creation with Power Apps. I have a text input control in user form.  

when user type in the required email address, on text input change, the email address typed must be validated with the O365 and show the status the email address is available or not.

 

I am unable to find a way to validate the typed email address with o365. can anyone please help me.

I have kept a color change icon near the text input. On successful validation, if the email address is available, the color changes to Green, else to Red.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User III
Super User III

Consider this:

If(TextInput2.Text in Office365Users.SearchUser({searchTerm:""}).Mail,Green,Red)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

@venka91 ,

If that is the case, you need to trigger the icon colour from somewhere. If you set a Variable at Screen OnVisible

UpdateContext({varUserCheck:false})

then whenever you wanted to trigger this colour change, you would put

UpdateContext({varUserCheck:true})

then the Color property if the Icon would be

If(
   !varUserCheck,
   Yellow,
   IsEmpty(
      Office365Users.SearchUserV2(
         {searchTerm: txtOffMailID.Text}
      ).value
   ),
   Red,
   Green
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

5 REPLIES 5
Super User III
Super User III

Consider this:

If(TextInput2.Text in Office365Users.SearchUser({searchTerm:""}).Mail,Green,Red)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Super User III
Super User III

Hi @venka91 ,

The code needs to be on the Color property of Icon, but I tested this and it works perfectly

If(
   IsEmpty(Office365Users.SearchUserV2({searchTerm: txtOffMailID.Text}).value),
   Red,
   Green
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Thanks. It worked. However i would like to reset the color to Yellow when my screen is loaded.

the Green or Red color stays on screen when i navigate it. anyways ?

@venka91 ,

If that is the case, you need to trigger the icon colour from somewhere. If you set a Variable at Screen OnVisible

UpdateContext({varUserCheck:false})

then whenever you wanted to trigger this colour change, you would put

UpdateContext({varUserCheck:true})

then the Color property if the Icon would be

If(
   !varUserCheck,
   Yellow,
   IsEmpty(
      Office365Users.SearchUserV2(
         {searchTerm: txtOffMailID.Text}
      ).value
   ),
   Red,
   Green
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Helper II
Helper II

Thank you so much. This exactly what i wanted. that a lot for the help.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (60,820)