cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Syriac31
Level: Powered On

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
Level: Powered On

Re: Lookup invalid Argument Type

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.

9 REPLIES 9
Mike8
Level 10

Re: Lookup invalid Argument Type

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
Syriac31
Level: Powered On

Re: Lookup invalid Argument Type

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?

 

Super User
Super User

Re: Lookup invalid Argument Type

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.
Mike8
Level 10

Re: Lookup invalid Argument Type

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

Syriac31
Level: Powered On

Re: Lookup invalid Argument Type

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
Level: Powered On

Re: Lookup invalid Argument Type

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.

Mike8
Level 10

Re: Lookup invalid Argument Type

Smiley Happy

Super User
Super User

Re: Lookup invalid Argument Type

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.
CindyZ
Level: Powered On

Re: Lookup invalid Argument Type

Thanks so much!  This helped me out also! 

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 445 members 4,497 guests
Please welcome our newest community members: