cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

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
Highlighted
New Member

Re: INVALID ARGUMENT - LOGIN FORM USING EXCEL

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
Highlighted
Helper IV
Helper IV

Re: INVALID ARGUMENT - LOGIN FORM USING EXCEL

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.

Highlighted
New Member

Re: INVALID ARGUMENT - LOGIN FORM USING EXCEL

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

Highlighted
New Member

Re: INVALID ARGUMENT - LOGIN FORM USING EXCEL

i tried this, but still not working..

 

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

Highlighted
Helper IV
Helper IV

Re: INVALID ARGUMENT - LOGIN FORM USING EXCEL

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.  

Highlighted
New Member

Re: INVALID ARGUMENT - LOGIN FORM USING EXCEL

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (7,090)