Data Table in UI "where clause" running multiple times in quick succession

Good day.

I have noted that the where clause for a UI data table tends to run multiple times when loading a page, sometimes triggering a reactjs 185 error. Is there a way to ensure the where clause logic only run once on page load? The problem seems to start the moment I use dateNow block in my where clause.

Hello @Frans_Fourie

We will be happy to assist you.

Please provide your applicationId.
What is the name of the container and the page on which you are seeing this behavior?

Regards,
Vladimir

Good day @Vladimir_Yalovy

APP ID: 26535B9F-121B-48A8-ACC2-7F6D4F01A455
Container: NJM
Page: icHealthConfirmedBookings & whosaConfirmedBookings

I found a work around by setting the “DateNow” to a variable on page enter logic and then calling that property into where clause of data table. It still runs multiple times (I saw that using a “Show Alert Message” block) but at least it avoids the 185 error.

Hello @Frans_Fourie

Handlers like ...Logic are launched on every rerender.
When you use DateNow, it is always a new timestamp, and since whereClause ends up with a new one, this starts loading new data.

Regards,
Vladimir

Hello @Vladimir_Yalovy

Okay I understand what you mean. Thank you for that. Could you please advise the best way for using where clause in data table when datenow is needed?

Hi, @Frans_Fourie

We are going to write an article describing the use of the where condition. Please watch our Knowledge Base on the support forum. We will also send you an additional article in this thread.

Regards,
Marina

@Marina.Rudenko
Thank you very much, it will be much appreciated