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

Filters with dropdown and sort gallery by date

Hello, in a gallery I established a filter with a dropdown in one of the fields, so far so good. But now I can't figure out how to sort records by date, from oldest to newest.

Database Name: Lic
First Filter: Filter (Lic, '68 Pending Delivery' = Dropdown1.Selected.Value)
Confirm with formula dropdown bar: ["YES", "NO"]

Attached images

 

ThanksImage 01.JPGImage 02.JPGImage 03.JPG,

3 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User III
Super User III

Hi @Rob_G ,

Try

Sort(
   Filter (
      Lic, 
      '68 Pending Delivery' = Dropdown1.Selected.Value
   ),
   '50F_Vto_OC',
   Ascending
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Highlighted
Microsoft
Microsoft

Hi@Rob_G,

 

Based on the issue you mentioned, you want to sort your gallery by date.

 

Generally speaking, it will sort by date on default. When it comes to specific months and days, you may need to set specific expressions.

 

You can try this based on your formula:

 

Sort(Filter (Lic, '68 Pending Delivery' = Dropdown1.Selected.Value), 50F_Vto_OC)

 

Hope this will be helpful.

 

Best Regards,

Qi Qiao

View solution in original post

Highlighted

Thanks @Rob_G ,

I am also an old (emphasis) Access man, so I understand, although this one is quite easy in Power Apps. On the Fill property of the card. Your logic has me a bit puzzled as dates before are reg and dates after are green, so how does the 15 days come in?

Anyway, syntax is below with over 15 days green

If(
    '50F_Vto_OC' < Today(),
    Red,
    '50F_Vto_OC' <= Today() + 15,
    Yellow,
    Green
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

6 REPLIES 6
Highlighted
Super User III
Super User III

Hi @Rob_G ,

Try

Sort(
   Filter (
      Lic, 
      '68 Pending Delivery' = Dropdown1.Selected.Value
   ),
   '50F_Vto_OC',
   Ascending
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Highlighted
Microsoft
Microsoft

Hi@Rob_G,

 

Based on the issue you mentioned, you want to sort your gallery by date.

 

Generally speaking, it will sort by date on default. When it comes to specific months and days, you may need to set specific expressions.

 

You can try this based on your formula:

 

Sort(Filter (Lic, '68 Pending Delivery' = Dropdown1.Selected.Value), 50F_Vto_OC)

 

Hope this will be helpful.

 

Best Regards,

Qi Qiao

View solution in original post

Highlighted

Thanks @v-qiaqi-msft for confirming my logic.

Yes, Ascending is the default - I generally put it in as a bit of a habit.

@Rob_G , happy to continue the thread to elaborate further if required.

Highlighted

Excellent....

Sort( Filter ( Lic, '68Entrega Pendiente' = Dropdown1.Selected.Value), '50F_Vto_OC', Ascending)

 

PD: 

Now how can I do this ?:
Dates before today are painted red. (Expired date)
Dates with 15 days to expire are painted yellow.
Dates after today's date are painted green. (Date not expired)


I managed to do it in Access, but in Powerapps I can't find how.
Do I need to open another topic?

 

Thank you very much for the support,

Highlighted

Thanks @Rob_G ,

I am also an old (emphasis) Access man, so I understand, although this one is quite easy in Power Apps. On the Fill property of the card. Your logic has me a bit puzzled as dates before are reg and dates after are green, so how does the 15 days come in?

Anyway, syntax is below with over 15 days green

If(
    '50F_Vto_OC' < Today(),
    Red,
    '50F_Vto_OC' <= Today() + 15,
    Yellow,
    Green
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

Highlighted

Fantastic...!

 

Increase the range to 20 days.

If (
     '50F_Vto_OC' <Today (),
     Net,
     '50F_Vto_OC' <= Today () + 20,
     Yellow,
     Green
)

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

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,849)