web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / lookup by datepicker a...
Power Apps
Answered

lookup by datepicker and dropdown.selected.value

(0) ShareShare
ReportReport
Posted on by 155

Hello, 

 

I'm having problems with the combination to lookup by date AND by an dropdwonvalue. 

 

First he has to filter the sharepointlist by the datepicker.selected.date and dependent on the dropdown.selected.Value. 

 

The formula i have for the date works already (converted to the same format. ) 

But he gives me now the column "ROR Antwerpen". I want to choose the colum dependent from the dropdownselectedvalue

powerapps lookup date and dropdownvalue.jpg

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @Stijn007 

    From reading your problem statement I understand you would like to replace 'ROR Antwerpen' with a column name dependent on the current selection of a dropdown.  My suggestion would be to use a conditional statement such as SWITCH to define which column should be returned from the LookUp.  Please see my example below.

     

    LookUp(
     'Commentaren B201 Management',
     Text(Datum"[$-en-GB]d/m/yyyy") = Text(DateCardValue2_1.SelectedDate,"[$-en-GB]d/m/yyyy"),
     Switch(
     Dropdown.Selected.Value,
     "ROR Antwerpen", 'ROR Antwerpen'
     ddvalue2, some_column2,
     ddvalue3, some_column3
     )
    )

     

    Let me know what questions you have

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

     

  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @Stijn007 ,

     

    Try to use below formula instead:

    LookUp(
     'Commentaren B201 Management',
     Text(Datum"[$-en-GB]d/m/yyyy") = Text(DateCardValue2_1.SelectedDate,"[$-en-GB]d/m/yyyy"),
     Dropdown1.Selected.Value=ROR_x0020_Antwerpen.Value
     
    )

    Dropdown1 is the dropdown control's name.

     

    Regards,

    Mona

  • Stijn007 Profile Picture
    155 on at

    @mdevaney wrote:

    @Stijn007 

    From reading your problem statement I understand you would like to replace 'ROR Antwerpen' with a column name dependent on the current selection of a dropdown.  My suggestion would be to use a conditional statement such as SWITCH to define which column should be returned from the LookUp.  Please see my example below.

     

    LookUp(
     'Commentaren B201 Management',
     Text(Datum"[$-en-GB]d/m/yyyy") = Text(DateCardValue2_1.SelectedDate,"[$-en-GB]d/m/yyyy"),
     Switch(
     Dropdown.Selected.Value,
     "ROR Antwerpen", 'ROR Antwerpen'
     ddvalue2, some_column2,
     ddvalue3, some_column3
     )
    )

     

    Let me know what questions you have

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

     


    Today, I tried in the Chrome Browser, 

    Could chose the column names and it works. 🙂 

     

    thanx

  • Stijn007 Profile Picture
    155 on at

    Now when i Have more than 1 item,i see that it always do the lookup at the first item. 

    It doesn't do the lookup to the date in the dataCardValue

     

     

     

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard