I have a rather simple calculated field in a details (lineitems) table:
if ( rc_to_rr_is_default.getSize() > 0 )
{ return 1;}
else
{ return 0;}
This field is displayed in a portal on the main form and have a method attached to enable the above relation for the ‘clicked’ portal line (putting the pk of the detail line into a column of the ‘parent’ table, thus letting only one line to be the default).
This works well, displaying the new line as ‘Default’, but whatever I do, the precedent default line also displays as if it is the default line too.
I guess what happens, is that the calculation is not triggered for other lines of the portal, as this calculation uses another relation, or simply that servoy has no idea that datas displayed in the portal have changed.
The portal is not refreshed until I reload the solution, or go in designer mode and back, which is about the same.
As I think that several other issues of the same type can appear, I strongly suggest that you provide us with a new function for elements:
elements.portal_relationname_.reloadData();
Thank you in advance