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

Dropdown Items filtered by date

Hi Folks,

I have a SPL (lets called my SPL's "New Products"). And (2) columns "TrimCode" (type = text) and "DateSubmit" (type =date and time).

 

In my PowerApps I have inserted a dropdown and I want to deploy only the "TrimCode" that has been submitted today, i.e. how could I filter my "TrimCode" based on "DateSubmit" = Today()?

 

Hope it makes sense!

Thanks

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi@Corleone,

Do you want to populate the Dropdown with ‘TrimCode’ based on the ‘DateSubmit’? I have a test on my side, please take a try as below.

Here is my SharePoint list as below.

003.png

As we know, the Date and Time column is a special type in SharePoint. We need to format the date when you want to process the date data. Since you want to filter the ‘TrimCode’ based on Today(), I assume that your Date and Time column is Date only. You can format this special column with DateValue() and I formatted the data types on both sides of the equal sign uniformly as Date type just in case. You can remove the DateValue() from Today() if you want to simplify the formula.

Add a Dropdown and set the Items property as below

Distinct(Filter('New Products',
         DateValue(Text(
            DateSubmit,
            DateTimeFormat.ShortDate
          ))  
      = DateValue(Text(Today(),DateTimeFormat.ShortDate))),TrimCode)

004.png

 

Best regards,

Qi

Best Regards,
Qi

View solution in original post

2 REPLIES 2
eka24
Super User III
Super User III

Try:
Filter('New Products',Text(DateSubmit,ShortDate)=Text(Today(),ShortDate))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

v-qiaqi-msft
Community Support
Community Support

Hi@Corleone,

Do you want to populate the Dropdown with ‘TrimCode’ based on the ‘DateSubmit’? I have a test on my side, please take a try as below.

Here is my SharePoint list as below.

003.png

As we know, the Date and Time column is a special type in SharePoint. We need to format the date when you want to process the date data. Since you want to filter the ‘TrimCode’ based on Today(), I assume that your Date and Time column is Date only. You can format this special column with DateValue() and I formatted the data types on both sides of the equal sign uniformly as Date type just in case. You can remove the DateValue() from Today() if you want to simplify the formula.

Add a Dropdown and set the Items property as below

Distinct(Filter('New Products',
         DateValue(Text(
            DateSubmit,
            DateTimeFormat.ShortDate
          ))  
      = DateValue(Text(Today(),DateTimeFormat.ShortDate))),TrimCode)

004.png

 

Best regards,

Qi

Best Regards,
Qi

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,994)