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

If statment always go to second condition

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

1 ACCEPTED SOLUTION

Accepted Solutions
PowerRanger
Resident Rockstar
Resident Rockstar

@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.




​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

6 REPLIES 6
Tqphan87
Advocate I
Advocate I

Replace the semicolons with commas.

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

PowerRanger
Resident Rockstar
Resident Rockstar

@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.




​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.

Still nothing uzytkownicy is table name Uzytkownik is column name

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

PowerRanger
Resident Rockstar
Resident Rockstar

@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.




​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
Helper II
Helper II

Thank you

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (6,804)