web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

If statment always go to second condition

(0) ShareShare
ReportReport
Posted on by

Hi all,

 

 I'm learning power apps.

 

I created a table in excel in which I have a username (without a password). I created such a condition:

If(TextInput2.Text in uzytkownicy.Użytkownik;Navigate(dostep);Navigate(odmowa))

 

but it always takes me to the second condition, even though I type the data correctly

I have the same question (0)
  • Tqphan87 Profile Picture
    32 on at
    Re: If statment always go to second condition

    Replace the semicolons with commas.

    If(TextInput2.Text in uzytkownicy.Użytkownik , Navigate(dostep), Navigate(odmowa))

  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on at
    Re: If statment always go to second condition

    @pablik01 Your formular is wrong. Try this instead

     

    If(TextInput2.Text = "uzytkownicy.Użytkownik";Navigate(dostep);Navigate(odmowa))

     

    ...assuming that uzytkownicy.Użytkownik is a String value you want to compare with.

     

    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.

  • pablik01 Profile Picture
    on at
    Re: If statment always go to second condition

    Still nothing uzytkownicy is table name Uzytkownik is column name

  • pablik01 Profile Picture
    on at
    Re: If statment always go to second condition

    no this not the "," are used in the USA in Europe we use ";"

  • Verified answer
    PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on at
    Re: If statment always go to second condition

    @Tqphan87 Now I see what you are trying to do. Your formular should look something like this then

     

     

    If(!IsBlank(LookUp(uzytkownicy;Uzytkownik = TextInput2.Text));Navigate(dostep);Navigate(odmowa))

     

     

    So basically we check if there is a record where column Uzytkownik equals the Text you have entered. If we do get a record (It is NOT Blank --> !IsBlank(....) ) then we Navigate to dostep otherwise to odmowa.

     

    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.

  • pablik01 Profile Picture
    on at
    Re: If statment always go to second condition

    Thank you

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 819 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 308 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 222 Super User 2025 Season 2

Last 30 days Overall leaderboard