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

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

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Top Solution Authors
Top Kudoed Authors
Users online (2,747)