cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Syriac31
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
Syriac31
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
Mike8
Memorable Member
Memorable Member

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?

Syriac31
Frequent Visitor

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 below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Mike8
Memorable Member
Memorable Member

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

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.

 

Syriac31
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

Mike8
Memorable Member
Memorable Member

🙂

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 below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thanks so much!  This helped me out also! 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,900)