cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
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

Anonymous
Not applicable

@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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (24,905)