cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SandroAlvares
Frequent Visitor

Filter Gallery by date with Dynamic CRM 365

Hello,

 

My first post and beginner

 

I try filter a range from today now()

 

Sort(Filter(Appointment; And( DateDiff(Now(); scheduledstart) <= 7 ; DateDiff(Now(); scheduledstart) >= 0)); scheduledstart; Ascending)

 

Sort(Filter(Appointment; DateDiff(Now(); scheduledstart) <= 7 && DateDiff(Now(); scheduledstart) >= 0); scheduledstart; Ascending)

 

Not work 😞 .. HELP .. later i need filter a range start = now()  at end 7 days to list gallery

 

I see a code example

https://powerusers.microsoft.com/t5/PowerApps-Forum/Only-show-item-if-date-is-within-date-range/td-p...

 

Much different datasource... sorry bad english!

2 REPLIES 2
v-yamao-msft
Community Support
Community Support

Hi SandroAlvares,

 

Do you have any other data source, such as SharePoint list, etc.?


If you have one, please test your code with a different data source to see if it will work.


Besides, what’s the format of “scheduledstart”? Please make sure it has the same format with now().

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello yamao,

 

Sharepoint not include connection Dynamic CRM and Oracle, i need connection Dynamic CRM

 

Look a format scheduledstart e scheduledend

 

 

I try different format is look: 

Translate english: Invalid argument type (Text). Waiting for a Number value, instead.

 

Try test do add label

  

DateValue(Text(scheduledstart; "dd/mm/yyyy"))

 

DateDiff(Now(); DateValue(Text(scheduledstart; "dd/mm/yyyy")))

 

2 Work are correct... Look

 

 

Make test: 

 

Sort(Filter(Appointment; (DateDiff(Now(); DateValue(Text(scheduledstart; "dd/mm/yyyy"))) <= 7 && DateDiff(Now(); DateValue(Text(scheduledstart; "dd/mm/yyyy"))) >= 0)); scheduledstart; Ascending)

 

why just label? is Gallery not work... filter much strange! Smiley Sad

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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