Data that doesn't appear / a ghost in the database

Hi guys,

i’d like to share a very strange issue I get, with kind of “ghost data” that exists in the database but are not accessible (neither from the page nor the app data view in the editor) … until I reload the page or the app data view.
This video shows what happens :
https://1drv.ms/v/s!Av3Nnlk32FEQn0x-NYpk7APpagQ7?e=EMkD2n

At the beginning, you can see that the calendar is empty. The first list of dates below is the current selection (at the default value for the moment), and the second one shows the date_list from the “location_calendar_availability” data type (do a search for location_calendar_availability’s date_list).
The location_calendar data type includes a list of related location_calendar_availability (empty at this time). The location_calendar_availability is empty too.

When I select a range and click the button labeled “rendre disponible”, the workflow add a record in location_calendar_availability and add this record to the availability_list of the related location_calendar. The range turns green, and you can see the list of date under the calendar.

At 01:00, I try to split the range in 2 parts, but the whole last part disappears. You can see it in both the calendar and the list of dates (data) below. All the dates after may, 31st disappeared.

However, there are 2 records listed in the availability_list! But only one in the location_calendar_availability view. Even when I refresh the data. :-\

And that’s where the magic begins: when I reload the editor, the “ghost data” is back (it’s the same when I reload the page)!?!

Any idea/help/exorcism ritual/magic spell about this issue? :sweat_smile:

I’m not sure if this is the same issue, but I’ve seen something similar happen when using a variable on a privacy rule that changes while the user is on the page. Privacy rules need to be fairly constant otherwise some strange things happen. So a privacy rule of User’s company is things company (where company doesn’t ever change) is a good rule, but User’s View is Things’s View (where view can be changed by user while on the page) is going to cause some very strange “Ghost-like” behavior with your data.

In your case, it is possible that you have a privacy rule set that changes with the date range of the calendar? That’s my one thought.

This doesn’t really account for the data not showing in the editor though, so not sure. Just a guess.

Thanks @aj11.
This app is in development stage, and has no privacy rule for the moment.
But feel free to make another guess :yum: