cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
praneepradee
Frequent Visitor

Login Validation

Hey,

I have a login screen which has two input texts and A captcha component.

I also have two error displaying labels for captcha and the two inputs if the input or captcha is wrong.

I want to Validate the Captcha first (if captcha is wrong the display error message in the label below captcha), if the captcha is right check quote id and email(if these two are wrong display the eror message below the form), if these two are right navigate to the next screen.

 

this is the formula i have worked on. But this doesnt fulfil the requirements.

.captcha.PNG

 

Please help!

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @praneepradee ,

Could the CaptchaText.CaptchaValidated formula not return proper boolean value?

 

Based on the needs that you mentioned, I think the formula I provided could achieve your needs. But you need to click the LoginButton to achieve your validation logic each time.

 

As an direct solution, please take a try with the following workaround:

set the Text property of the CaptchaErrorMessage Label to following:

"Wrong Captcha"

set the Visible property of the CaptchaErrorMessage Label to following:

If(
   !CaptchaText.CaptchaValidated,    // type wrong captcha value
    true,
    false
)

 

Set the Text property of the errormessagebox Label to following:

"Wrong Quote ID or Email Address"

set the Visible property of the errormessagebox Label to following:

IsShowError1   // variable initialized in OnSelect property of LoginButton

 

Set the OnSelect property of the LoginButton to following:

If(
   IsBlank(LookUp(Quotes, 'Quote ID' = quoteinput.Text && 'Email Address' = emailinput.Text)),
   Set(IsShowError1, true),
   Set(IsShowError1, false);Navigate(QuoteDetailScreen, Fade)
)

set the DisplayMode property of the LoginButton to following:

If(
   CaptchaText.CaptchaValidated,
   DisplayMode.Edit,
   DisplayMode.Disabled
)

Note: The LoginButton would be disabled until you typed a proper Captcha value

 

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

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @praneepradee ,

As far as I am aware, Captcha is not something that will interface with any PowerApps code. This post may offer some alternative ideas.

 

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.

v-xida-msft
Community Support
Community Support

Hi @praneepradee ,

Do you want to validate the Captcha firstly, and then check entered quote id and email when you press the LoginButton?

 

I have made a test on my side, please consider take a try with the following workaround:

Set the Text property of the errormessagebox Label to following:

"Wrong Quote ID or Email Address"

set the Visible property of the errormessagebox Label to following:

IsShowError1   // variable initialized in OnSelect property of LoginButton

 

set the Text property of the CaptchaErrorMessage Label to following:

"Wrong Captcha"

set the Visible property of the CaptchaErrorMessage Label to following:

IsShowError2   // variable initialized in OnSelect property of LoginButton

 

Set the OnSelect property of the LoginButton to following:

If(
   !CaptchaText.CaptchaValidated,
   Set(IsShowError2, true),
   Set(IsShowError2, false);If(
      IsBlank(LookUp(Quotes, 'Quote ID' = quoteinput.Text && 'Email Address' = emailinput.Text)),
      Set(IsShowError1, true),
      Set(IsShowError1, false);Navigate(QuoteDetailScreen, Fade)
   )
)

Please consider take a try with above solution, then 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.

Hey,

 

Thanks for the reply!

 

I tried out your solution.

But im not able to navigate to the next screen.

And the captcha error message doesn't display even if i dont input the captcha or enter the wrong captcha.

 

Help!

Thanks.

Hi @praneepradee ,

Could the CaptchaText.CaptchaValidated formula not return proper boolean value?

 

Based on the needs that you mentioned, I think the formula I provided could achieve your needs. But you need to click the LoginButton to achieve your validation logic each time.

 

As an direct solution, please take a try with the following workaround:

set the Text property of the CaptchaErrorMessage Label to following:

"Wrong Captcha"

set the Visible property of the CaptchaErrorMessage Label to following:

If(
   !CaptchaText.CaptchaValidated,    // type wrong captcha value
    true,
    false
)

 

Set the Text property of the errormessagebox Label to following:

"Wrong Quote ID or Email Address"

set the Visible property of the errormessagebox Label to following:

IsShowError1   // variable initialized in OnSelect property of LoginButton

 

Set the OnSelect property of the LoginButton to following:

If(
   IsBlank(LookUp(Quotes, 'Quote ID' = quoteinput.Text && 'Email Address' = emailinput.Text)),
   Set(IsShowError1, true),
   Set(IsShowError1, false);Navigate(QuoteDetailScreen, Fade)
)

set the DisplayMode property of the LoginButton to following:

If(
   CaptchaText.CaptchaValidated,
   DisplayMode.Edit,
   DisplayMode.Disabled
)

Note: The LoginButton would be disabled until you typed a proper Captcha value

 

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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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