cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
johanjohari
Regular Visitor

INVALID ARGUMENT - LOGIN FORM USING EXCEL

Hello All.

 

I am a newbie here in PowerApps. I am a teacher from Malaysia and currently building an attendance apps for Co-Curricular activities.

 

I am currently working with a LOGIN PAGE that's connect the database from Microsoft Excel. Basically I wrote the argument based on Microsoft Excel Knowledge, but it returns Error : "Invalid Argument Type: ButtonLogin.OnSelect

 

the table is smg
the field for username is NOGAJI

the field for password is KATALALUAN

 

I attach this picture for anyone to help me what can I do  for my school project.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
johanjohari
Regular Visitor

I don't know I I solved this... but when I type this, it solved my problem..

LookUp(smg;NOGAJI=username.Text;If(username.Text=NOGAJI&&password.Text=KATALALUAN;Navigate(main);""))

 

thank you all

View solution in original post

5 REPLIES 5
dyee4614
Helper V
Helper V

It looks like you aren't classifying your answer as text. Here is what I think you need to do:

 

username.text = smg&".NOGAJI"

 

If that doesn't work, go to your global variable and confirm SMG is a text field.

johanjohari
Regular Visitor

I don't know I I solved this... but when I type this, it solved my problem..

LookUp(smg;NOGAJI=username.Text;If(username.Text=NOGAJI&&password.Text=KATALALUAN;Navigate(main);""))

 

thank you all

View solution in original post

i tried this, but still not working..

 

If(username.Text = smg&".NOGAJI" && password.Text = smg&".KATALALUAN";Navigate(main);Navigate(denied))

Sorry, I didn't realize smg was the data source.  My code won't work for that.  I don't know the best way to do this but here is what I've done in the past.  

 

Step 1: I modify the data source to include two fields.  The first is a concatenate w/ username and password.  I called this userpass.  Note: Make sure you remove the formula by paste special.  The second field is just a number.  I plugged one in for this but if you want to make different tiers based on users you can do that.  

 

Step 2: I went into the app and I went to the displaymode field.  I put in a lookup concatenating the two text input fields.  This way if it's above 0 (ie the lookup is successful) the button turns blue and if not it remains gray.  

I also tried this,

LookUp(smg;NOGAJI=username.Text;If(username.Text=NOGAJI&&password.Text=KATALALUAN;Navigate([@main]);Navigate([@denied])))

 

there is no invalid argument, but, when username and password is correct, it will navigate, but, if username and password incorrect, the navigation to "denied" screen is not working... 

 

😅

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

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

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (43,301)