Related on Forms bug?

  1. I open the “Compras” Form.

  2. I add an Item and “Cantidad de Items” correctly change from 0 to 1. Ok.

  3. Clic on the Item, then clic the Delete button to remove the single item from the Related List. OK.

  4. What’s happend here? The counter still says 1, instead of changing back to 0 items. Does anyone know why this behavior occures?

PS: When I add items, the change is detected and everything updates to the real thing, but when I remove items, the change is not detected and nothing updates.

Are you using the mobile framework preview? If so, please post your concern to its announcement thread:

2 Likes

No, Im using the web preview.

Your question gave me the idea to try it in the movile preview, and in that environment the update does work fine, but the bug is in the web environment.

1 Like

Doing tests on Mobile framework preview I detect another isue, the Total is not updating when I add another item again after remove the previews, but on web environment preview it recalculate fine.:

1 Like

2 Likes

@amyplin, any insight?

1 Like

Thanks for sharing these details, we will take a look.

3 Likes

I could reproduce the value not updating after delete, I think we can fix that.

I couldn’t reproduce the other total not updating though. I took that to be a show-type column with a Content expression that does something like SUM([Related Rows][Number]), is that right?

When you’re referring to “Mobile framework preview” can you clarify if you have the “new mobile framework” enabled in general settings?

2 Likes

Ok, When i referring to “Mobile framework preview” i mean the right section on the app edit like… tables seccion where is an app simulator on the right side. Now i can see that “Mobile framework preview” is a diferent thing. No i have not enabled the “New mobile framework (preview)”. Sorry for my confusion about that.

End about my Total field, yes is a show field called show_total, and it has the following formula:

CONCATENATE(
"TOTAL: ",
LOOKUP(2, “Monedas”, “id”, “simbolo”),
" “,
SUBSTITUTE([totalEnBolivares], “.”, “,”),
" (”,
LOOKUP(1, “Monedas”, “id”, “simbolo”),
" ",
SUBSTITUTE([totalEnDolares], “.”, “,”),
“)”
)

And the totalEnDolares field (for example) is an real field (not virtual) and has the following formula on Initial Value:
IF(
ISNOTBLANK([Related Items_Compras]),
SUM(
[Related Items_Compras][montoTotalEnDolares]
),
0
)

Here is where is related the formula to items list. Thats why it should be update or recalculate where the list change. This happend only when the environment is web mode, but not happend on mobile app mode. Now…. the other filed withe the count of items, i called “cantidadItems”, is a virtual column too and has the following formula:
COUNT([Related Items_Compras])
On this case, is work fine on mobile app mode, but no working on web mode.

I hope this information can help you to reproduce the problem.

Thank you very much for your response.

Now im thinking… maby is not necessary the IF formula, and… maby just need:

SUM(
[Related Items_Compras][montoTotalEnDolares]
)

I will try changing it later, but I believe this change will not change the situation.

For additional information, in the Purchase form, creating a new purchase, adding items in the same form.


WHEN I ADD THE FIRST ITEM:

[show_total] Total field (equivalent to saying totalEnDolares y totalEnBolivares real fields) :

  • On Mobile App mode (no web) → no calculate the total amount.
  • On Web environment → detect correctly and calculate the total amount.

[cantidadItems] Count field :

  • On Mobile App mode (no web) → detect correctly the quantity of items.
  • On Web environment → detect correctly the quantity of items.

WHEN I REMOVE SOME ITEM FROM THE LIST:

[show_total] Total field (equivalent to saying totalEnDolares y totalEnBolivares real fields) :

  • On Mobile App mode (no web) → It still doesn’t work - no calculate nothing.
  • On Web environment → No detect the change, No recalculate the total, is still showing the previous total.

[cantidadItems] Count field :

  • On Mobile App mode (no web) → Still working fine, detect the new count of items.
  • On Web environment → No detect the change of count. I had 2 items, it said 2 correctly, when I deleted 1 item, now have only 1 item, the 2 does not change to 1 on count field.

Table presentation (with “New mobile framework (preview)” option disabled):

So, there are bugs on both Environments, but in different situations in each one.

I enabled the “New mobile framework (preview)” option to test and this was the result:


WHEN I ADD THE FIRST ITEM:

[show_total] Total field (equivalent to saying totalEnDolares y totalEnBolivares real fields) :

  • On Mobile App mode (no web) → calculate total correctly.

  • On Web environment → detect correctly and calculate the total amount.

[cantidadItems] Count field :

  • On Mobile App mode (no web) → detect correctly the quantity of items.

  • On Web environment → detect correctly the quantity of items.


WHEN I REMOVE SOME ITEM FROM THE LIST:

[show_total] Total field (equivalent to saying totalEnDolares y totalEnBolivares real fields) :

  • On Mobile App mode (no web) → No detect the change, no recalculate, is still showing the previous total.

  • On Web environment → No detect the change, no recalculate, is still showing the previous total.

[cantidadItems] Count field :

  • On Mobile App mode (no web) → No detect the change and don’t show the new count of items.

  • On Web environment → No detect the change. I had 2 items, it said 2 correctly, when I deleted 1 item, now have only 1 item, the 2 does not change to 1 on count field.


Table presentation (with “New mobile framework (preview)” option enabled):