I have a forum in my app where users can publish new topics. A topic can be published directly or some time and date in the future. I want new topics to automatically appear on a forum if a user have the page open and the time is past the time set for publishing.
Initially, I tried setting up a AppVariable called Now with the following setting:
, and then use that filter as part of the initial filter on the runtime data source. Doing this will indeed prevent the data source from containing topics that should only be visible in the future, but if someone publishes a new topic directly, the data source would not reflect this unless the page was refreshed. This leads me to the conclusion that Now() contains the timestamp when the data source is initiated. It will not continue to read in new data when the time changes, even if “Initially subscribe to updates” is checked.
If I remove the PublishAt <= Now() from the filter, the data source will update when new topics are posted.
How can I design the app/data sources so that new topics will automatically appear on open pages when they pass the time of publishing? Or will such a design (when I get it working) have too much of a performance impact, so I should opt for a different design altogether? For example, by using a notification service that runs on a schedule?