cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rabbanisyed
Helper V
Helper V

DataTabel with dropdown

I have a List in SP where the data table items are loaded from list i wanted a filter to change the data table items based on dropdown selection

example : my dropdown items are ["2000","2001","2003","2004"] i receive an error i wanted to convert string in date format using the filter command

Filter('datasource','Date of Separation',Text("[$-en-US]yyyy")=ddyrs.SelectedText.Value). any ideas 

DtablewithDd.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

i did a work around i have created a Field in Sharepoint as YEAR and bind to dropdown  and then put the  formula

Filter('Staff Separation',Year=ddyrs.SelectedText.Value) once i select a year from the drop down my data table display the items 

 

 

View solution in original post

3 REPLIES 3
mdevaney
Super User
Super User

@Rabbanisyed 

What you are asking is not possible in a data table control.  You have to build a gallery that looks like a table and supply a Dropdown. Here’s a video from Reza Dorrani that shows how to do it.  https://m.youtube.com/watch?v=8I0Pt_8I6k8

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

i did a work around i have created a Field in Sharepoint as YEAR and bind to dropdown  and then put the  formula

Filter('Staff Separation',Year=ddyrs.SelectedText.Value) once i select a year from the drop down my data table display the items 

 

 

Pstork1
Dual Super User
Dual Super User

The filter function requires a logical expression not just a field and a value.  But the error you are getting is because you want to filter by year.  You can't format just a year as a Date time value.  I think this is the filter command you want

Filter('datasource',Year('Date of Separation') = ddyrs.SelectedText.Value)

But as @mdevaney said you can filter the contents of a table but you can't edit values inside a table. Which is what I think you are trying to do.

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,975)