mobile icon indicating copy to clipboard operation
mobile copied to clipboard

Recursuive apply on default update

Open jozef-budac opened this issue 1 year ago • 4 comments

There is a problem with a scenario, when there is recursive apply on default update on multiple fields. I have one field with "apply on default update" and another one, which the same and is controlled by the previous field.

In the tc05_forms_derived, there is a tab Data. It is hidden till something is filled into Value on the Information tab. On the Data tab, there are 4 fields:

  1. Population (sets population of bears in Slovakia)
  2. Limit (sets limit, till somebody from Slovakia parliament is going to do about it)
  3. Danger is the first field with "apply on default update" sets with value "Population" > "Limit"
  4. Name is the 2nd field, which is controlled by the Danger field and has "apply on default update" set with if("Danger" IS 'false',' Bear safe',' Bear dangerous')

This means, that when Population is > than Limit, the Danger should be true, and Name should be Bear dangerous. This is not happening and because of it, the Slovak parliament doesn't know what to do with it.

In the video, you can see that the update of the Name field is delayed and with the next update has the correct value from the previous data update.

Please note: if you are not familiar with conflicts between bears and politicians in Slovakia, you can freely ignore all the comments on this topic :)

https://github.com/MerginMaps/mobile/assets/83582181/988be761-900d-42f8-b920-0f11e39a2c4f

jozef-budac avatar Apr 23 '24 17:04 jozef-budac

@jozef-budac can you please try it on production?

tomasMizera avatar Apr 25 '24 06:04 tomasMizera

Discussed with @jozef-budac and seems to be gone

tomasMizera avatar Apr 29 '24 06:04 tomasMizera

I can again observe the issue https://github.com/MerginMaps/mobile/assets/83582181/1237d2ed-544d-49d6-8ff7-43622a3c3b96

jozef-budac avatar Jun 03 '24 07:06 jozef-budac

I re-tested this and the problem still occurs in the latest build.

  • App version: 2025.7.0 (build 721011)

  • Project: tester-ws-1 / tc05_forms_derived

  • Reproduction (short):

    1. Open project and record a new feature in the Bears layer.
    2. On the Information tab enter a value > 0 to reveal the Data tab.
    3. On the Data tab set Population = 10 and Limit = 9.
    4. Observe the fields: the Danger field becomes TRUE, but the Name field remains "Bear safe" (it should become "Bear dangerous").
  • Actual: Danger updates to TRUE but Name stays "Bear safe".

  • Expected: When Danger is TRUE, Name should update immediately to "Bear dangerous".

Notes:

  • I can attach a screenshot or short video if helpful.
  • Tested on v2025.7.0 build 721011. Please let me know if you want any additional logs or environment info.

IvaKuklica avatar Oct 28 '25 15:10 IvaKuklica