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.

View solution in original post

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.

View solution in original post

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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,273)