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

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
Highlighted
Super User III
Super User III

@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.
Check out my PowerApps Videos too!

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

@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.
Check out my PowerApps Videos too!

View solution in original post

Highlighted
Resolver II
Resolver II

@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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (3,776)