cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MatsGustavsson
Level: Power Up

Why cant I choose from the selected list in the lookup

I am trying to use this to get the price for the choosen PC, but it says error on equal to

If(!IsEmpty(Valjdator3.SelectedItems); LookUp('PC-items'; Name = Valjdator3.SelectedItems.Name;ItemNumber))

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Why cant I choose from the selected list in the lookup

@MatsGustavsson 

SelectedItems is a table.  So referring to the .Name value is not valid.

Try this for your formula instead:

If(
   !IsEmpty(Valjdator3.SelectedItems); 
   LookUp('PC-items'; Name = Valjdator3.Selected.Name;ItemNumber)
  )

I hope this is helpful for you.

_____________________________________________________________________________________
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.
2 REPLIES 2
Super User
Super User

Re: Why cant I choose from the selected list in the lookup

@MatsGustavsson 

SelectedItems is a table.  So referring to the .Name value is not valid.

Try this for your formula instead:

If(
   !IsEmpty(Valjdator3.SelectedItems); 
   LookUp('PC-items'; Name = Valjdator3.Selected.Name;ItemNumber)
  )

I hope this is helpful for you.

_____________________________________________________________________________________
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.
AndrewCarter
Level 8

Re: Why cant I choose from the selected list in the lookup

@MatsGustavsson 

 

Should your If expression have comma instead of semi-colon, or is this a language thing?

 

Could it not be written Lookup('PC-Items', Name = If(!IsBlank(Valjdator3.SelectedItems), Valjdator.SelectedItems.Name, ItemNumber))

 

Andrew

Helpful resources

Announcements
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: 166 members 4,304 guests
Please welcome our newest community members: