Hi there,
I am having trouble with a post schedule system. I am looking to schedule a number of posts to go out at the same time each day.
How this currently works:
- When a post is created it is given a schedule date.
- Each day at 8am a backend workflow activates and finds all posts scheduled to go live on that day, this is working fine and finds them perfectly.
- The workflow then sets each shows publish date to current date time at an exact time using “change hours to 8”, “change minutes to 0”, “Change seconds to 0”. And sets them live. See Below.
These posts are then displayed using a repeating group (For the dates) nested in a repeating group (With the posts in related to the date). The first repeating group gets all posts published in the last 7 days and uses unique elements to get each date. See image below.
However it seems that sometimes it gets more unique values than there are supposed to be and some dates are displayed twice, See image below.
All of these posts should have the exact same published date (Ignore broadcast that relates to something else)
Hopefully this makes sense.
With some fiddling with the published date I can get them all under the same date card. It seems to be relating to the exact time of the posts being slightly different even though they are all set to the exact same time.
Any ideas why this is happening?
Thanks everyone,
Johnny
Zeroic
2
In this case, what does your debugger show as the list of dates for this RepeatingGroup?
Jici
3
Your published date field is a date type, this include hours, min, seconds… So if they are not created exactly at the same time, unique element will consider them all different date. And this is correct.
I think the best option you have is to use :group by after the Search for shows
Another option is to use :formatted as after the published date and before:unique element. At this moment, you will format the date as text (so the RG type will be text and not date).
system
Closed
4
This topic was automatically closed after 70 days. New replies are no longer allowed.