cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

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

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

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

Highlighted
Community Support
Community Support

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.
Highlighted
Helper III
Helper III

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

Highlighted
Helper III
Helper III

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

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,228)