Weird logic Variable behaviour

I have a very weird behaviour with Page Data Property and Variable.
I’m in the process of working around a Select Component bug, which gives me some headache.

What I’m doing is trying to reset setting a Page Data Property, which mirrors a database table item.
For this, I get the table scheme, and I reset all the sub-properties in my Page Data Property
Capture d’écran 2024-08-28 à 12.08.32

This gets me a bunch of errors :
Capture d’écran 2024-08-28 à 12.10.03

The weird thing are :

  1. It’s not the request that gives me the error. When I disable the ‘set property’ block, the errors don’t occur
    Capture d’écran 2024-08-28 à 13.03.59
    Capture d’écran 2024-08-28 à 13.04.20

  2. when I set a property manually instead of doing it within the loop, it works fine.
    Capture d’écran 2024-08-28 à 12.49.50

What can I do if i don’t want to make the whole thing manually, and rewrite part of the logic when my table schema changes ?

Hi @MF_de_Preval ,

The error I see on your screenshots—429 Too Many Requests—is not related to the logic you are showing. Most likely, this error indicates that you have exceeded the allowed request limit per minute for your billing plan.

Regards,
Viktor

Viktor,
Thanks for coming back.

As I mentionned, I get this with the SET PROPERTY block, and it sets properties in a page variable …
As you mention, this does not seem related with ANY request, but the FACT is :
Block Enabled → error
Block Disabled → no error

Hi @MF_de_Preval ,
I just checked in my application, everything works as expected for me.
This problem is located somewhere else, could you provide the name of the component and container in which this logic is present?

Please also note that with this use, overwriting data in the “Page Data” object, in “item_selected” you can mutate the original object that you loaded from the database and clear all its fields not only in “item_selected”

Regards,
Sergey

Hi Sergey,

Thanks for taking a look.

  • app ID : 5828264F-A34B-5C49-FFD5-3FA0319B2D00
  • Page : Locataires_ter
  • Component name : “Bouton Ajouter Locataire” (in container Page / Page Panel / Workspace)
    Capture d’écran 2024-08-29 à 17.33.18

Also, I’m aware of the possible mutation.

Regards.

Hello @MF_de_Preval

The problem is that you are changing PageData in a loop.

Regards,
Volodymyr

Hi @MF_de_Preval

In addition to the answer above a re-render phase does not run any API calls, but it seems like somewhere in your logic there is code which runs these API call on each re-render.
It might happen when you have API call blocks in the following handlers:

  • ClassesLogic
  • VisibilityLogic
  • ValueLogic
  • OnRender
  • etc.

first of all need to find the handler/block which runs the API call

Regards,
Vlad