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

Lookup invalid Argument Type

Hi,

I thought I was trying somethig simple but hey...

The idea is to create access rights on a SP Form by looking up a SP List that has the UserID and their relavant roles. The UIDs are "Person or Group" field, and the Role field is a dropdown list.

 

All I want to do is pickup the current 365 user on the SP Form (I've got that) and look it up to my SP List to check what role they have. The Lookup gives me an "Invalid Argument Type".

 

I sense it is a data format sort of issue. I've spent hours on this but no luck, if someone could help that'd be great - many thanks.

 

Capture4.PNG

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Hi Everyone,

 

I  cracked it!!!

 

And the Winner is:

LookUp('SE Dwg AdminUsers', UserID.DisplayName = DataCardValue1.Selected.DisplayName, Role.Value)

 

Thank you everyone for your help - you saved me hours of research.

View solution in original post

10 REPLIES 10
Highlighted
Solution Sage
Solution Sage

Hello,

The second part of the equation DatacardValue1.SelectedItems.DisplayName returns a table.
I think this is the issue.
Can you try DatacardValue1.Selected.DisplayName instead?

Highlighted

Thank you Mike8,

 

Yes, but UID is also a table record, that's why I don't get it 😐

 

IsBlank(LookUp('SE Dwg AdminUsers', UID = DataCardValue1.Selected.DisplayName).Role) still brings up the same red-underlined "=" sign and stating the "Invalid Argument Type".

 

No cigar I'm afraid. Any other ideas?

 

Try:

   IsBlank(LookUp('SE Dwg AdminUsers', UID.DisplayName = DataCardValue1.Selected.DisplayName).Role)

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Highlighted

What does it suggest if you add a point after UID?
Can you have UID.Value=DataCardValue1.Selected.DisplayName
I think you don't want to compare a table with a table. What you need is to compare a string from a table to an other string from an other table

Highlighted

Hi RandyHayes,

 

Thank you for your input.

 

The formula you suggested displayed a Warning icon with a "Warning Delegation..." message but returned a value "false" which is a breakthrough. Now I need to get the actual real value and used the following:

LookUp('SE Dwg AdminUsers', UserID.DisplayName = DataCardValue1.Selected.DisplayName, Role)  which gets underlined in Red with a Warning icon with a "Warning Delegation..." but the field remains blank.

 

Highlighted
Frequent Visitor

Hi Everyone,

 

I  cracked it!!!

 

And the Winner is:

LookUp('SE Dwg AdminUsers', UserID.DisplayName = DataCardValue1.Selected.DisplayName, Role.Value)

 

Thank you everyone for your help - you saved me hours of research.

View solution in original post

Highlighted

🙂

Highlighted

Ah yes, forgot your Role column probably was a choice column and then, yes, you'd need the .Value

Glad you got it.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Highlighted

Thanks so much!  This helped me out also! 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,983)