Collection component disapear randomly from some devices

I have a page where there are 2 collection components. The first filtered so that only this week’s deliveries appear. And the other filtered so that next week’s deliveries appear.
The error that appears randomly is that the first collection keeps disappearing from some devices. For example, there are 5 users who use the app, and when the error occurs there are 2 or 3 who no longer see the first collection while the others see everything normal.

Support no longer responds to me because they can’t find the reported error, I don’t even check it from my smartphone or PC, but there are users I’ve seen that it doesn’t work for them and it does for me. We have updated and modified the table and filters in various ways but the same problem still arises.

Has something similar happened to anyone?

How do you determine whether deliveries are this week or next week?

For those users that have the problem, are they all using the same type of device?

Hi Darren!

To determinate the week i use the type “formate date”:
**Name: thisWeek **
Date: Current date time
Format: yyyyW
thisWeek

To determinate next week, i use the type “Math”:
thisWeek+1
nextWeek

Users who have the problem always are 3:
1°: Used on Desktop device, with windows 11.
2°: Used on Desktop device, with macOS
3°: Used on Mobile device iphone 12 pro, with iOS.

When the problem is on, i can’t see the problem from my devices:
Me: Used on Desktop device, with windows 11.
Me: Used on Mobile device iphone 15, with iOS.

That’s probably it. Those built in date manipulation plugins don’t play well on all devices. You are better off using a math column to get what you need. I’ve never trusted the Format Date column.

This week
Year(Date)10^4+Weeknum(Date)

Next week
Year(Date+7)10^4+Weeknum(Date+7)

2 Likes

Yes, i used this way before. I dind’t use math because that get me this kind of problem.

Sunday week number is different.
weekNum

I think if I go back to using this route.

Weeks are typically structured as Sunday first, where Sunday is day 1 and Saturday is day 7 in a single week. Let me think about this for a bit. I’m sure there is a way to structure the math to account for a Monday first week, but I want to test out some ideas first.

1 Like

I think this will work, but I’m a little leary about how it will react at the beginning or end of the year since week numbering is heavily reliant on Sunday being the first day of the week. Sunday may fall into the wrong year. (I did not test this thoroughly.)

This Week

Year(Date-Mod(WeekDay(Date),2))*10^2
+
WeekNum(Date-Mod(WeekDay(Date),2))

Next Week

Year(Date+7-Mod(WeekDay(Date+7),2))*10^2
+
WeekNum(Date+7-Mod(WeekDay(Date+7),2))

The alternative is probably some javascript to handle it, or breaking it down into multiple columns…a math column to get YYYYW, another math column to get the weekday number, an if column that returns if Sunday and 0 for other days, and another math column to subtract that IF column value from the YYYYW value.

2 Likes

Really interesting your solution,

i guess i’ll get the second one. Because as you say, at the beginin and the end of the year surly there will be some bug.

I’ll use 3 col to get sunday on the same week.
On the table with the dates, i’ll use these 3 coll to put sunday and the other days on the same week.

1° col: Type math (Get all weeks -1)

Math

Year(date)*10^2+WeekNumb(date)-1

2°col: Get the name of every day to filter by sunday

Format Date

Format(cccc)

3°col: Filter sundays

If (date name=Sunday) then (weekNum-1)
else (weekNumb)

In this way i get sundays in the same week for every day, without bugs at the end of the year. (theoretically😥)

Even using only math col the problema appear again. Someone have the same problem?

It’s local the problem, when it happens i see how the table disappear on my client devices but in my devices i see all ok.

My client

My device when the problem happpens

Show us how everything is configured. Show us the configuration for the filter for each collection. Show all the table columns used in each of the filters, and how each of those columns are configured.

This should just work but something is being overlooked and we probably won’t see it until we have screenshots or a video of everything and how it’s all configured.

1 Like