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

Lookup function giving Invalid Argument Type

Hi

 

I am fairly new to Powerapps and are struggling with a Lookup Function.

 

I have created a Viewform with sharepoint list "Hardware" as the datasource. The Viewform should Lookup a text value in the column "Title" and match it with the value displayed in a Datacard on the same screen. If it matches, it should display that record.

 

Currently my string looks as follow:

 

LookUp(Hardware, Title.Value = DataCardValue214_1.Text) --> In powerapps "Value", "=" and "Text" is underlined in RED.

 

The "Title" column is a single line text format and "DataCardValue214_1" is pulled from a different sharepoint list with a lookup column linked to the same "Hardware" list.

 

How do I fix this?

 

Please let me know if you need more info.

 

Thanks

Nico

5 REPLIES 5
Jeff_Thorpe
Super User
Super User

Have you tried this:

 

LookUp(Hardware, Title = DataCardValue214_1.Text)


--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Hi 

 

I have tried it, but to no avail.

It appears the issue is with the datacard type. It currently shows as "complex".

 

I created a text box and made the value of the textbox "datacardvalue214_1" and it is underlined in red and the error message shows: "The property expects Text values, but this rule produces incompatible Control values".

 

I have also tested the formula by removing the datacardvalue and replacing it with text of one of the records and it works then, so the issue is definitely with the type of datacardvalue.

 

See below:

LookUp(Hardware, Title = "Yealink T21P")

 

Any idea how I could get the plain text value of the datacard "datacardvalue214_1" ? 

 

Thanks

What type of control is your data card value (Text box, Combo box, Drop down, date field or something else)?



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

having same issue...

 

i have combo box control.

 

my complete formula is:

If(LookUp(EmpAndApprover,Approver=DataCardValue11,true), 

 

red underline in datacardvalue11 

error is invalid argument type

 

New Error.jpg 

 

 

 

Please help to solve

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (46,308)