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
Highlighted
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.

View solution in original post

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?

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.

 

Highlighted
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.

View solution in original post

Mike8
Level 10

Re: Lookup invalid Argument Type

🙂

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
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 197 members 4,992 guests
Recent signins:
Please welcome our newest community members: