Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Using &&& and || in LookUp

Posted on by 51

Hello there!

 

I'm trying to perform LookUp on a "settings" table with multiple conditions & am observing strange behavior. 

 

LookUp (
settings,
 dropdown1.Selected.Value in Column1.Value
 && dropdown2.Selected.Value in Column2.Value
 && dropdown3.Selected.Value in Column3.Value
 && (dropdown4.Selected.Value in Column4.Value || "All" in Column4.Value)
)

 

I'm trying to look up the record that matches the dropdowns to column values except in case of dropdown4, where the condition becomes an OR within the AND (all the other conditions must be met and either dropdown4's selected value is in column 4 OR "All" is in Column 4 - one or the other needs to return true). everything works right up until the last line. 

 

Is my syntax correct for what I'm trying to do? Any suggestions?

 

Thanks in advance!

 

 

 

Categories:
  • ImaKickUrAsh Profile Picture
    ImaKickUrAsh 51 on at
    Re: Using &&& and || in LookUp

    Hello,

     

    I could not - they are multi-select fields & would throw errors when I removed .Value 

  • Verified answer
    v-jefferni Profile Picture
    v-jefferni on at
    Re: Using &&& and || in LookUp

    Hi @ImaKickUrAsh ,

     

    Could you please share more details about your scenario? What data source is it? What are the types of the columns 1-4? 

     

    It seems these columns are all Choices columns allow multiple selections, if this is the case, you can also try below formula:

    With(
     {
     wFilter: Filter(settings, dropdown4.Selected.Value in Column4.Value || "All" in Column4.Value)
     },
     LookUp(
     wFilter,
     dropdown1.Selected.Value in Column1.Value
     && dropdown2.Selected.Value in Column2.Value
     && dropdown3.Selected.Value in Column3.Value
     )
    )

     

    Best regards,

  • BhargavPatel Profile Picture
    BhargavPatel 606 on at
    Re: Using &&& and || in LookUp

    @ImaKickUrAsh Can you try removing ".Value" from all the column names?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,591

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,090

Leaderboard