cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Stijn007
Level: Powered On

lookup by datepicker and dropdown.selected.value

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: lookup by datepicker and dropdown.selected.value

@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."

 

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

Re: lookup by datepicker and dropdown.selected.value

@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."

 

View solution in original post

Community Support Team
Community Support Team

Re: lookup by datepicker and dropdown.selected.value

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

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Stijn007
Level: Powered On

Re: lookup by datepicker and dropdown.selected.value


@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
Level: Powered On

Re: lookup by datepicker and dropdown.selected.value

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

 

 

 

 

 

Helpful resources

Announcements
thirdimage

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,417)