[Form BUG] when using conditional webblocks forms are prefilled

[Form BUG] when using conditional webblocks forms are prefilled



I have created a simple application where prefilling a form goes faulty.

as in, it doesn't get filled, even though the query works and gets a result.

check the demo: https://joostlandgraf.outsystemscloud.com/FormIssue/

(oml is also attached)

This is in platform-server 9.1.601.0 (also happens in 9.1.300.0)

(Note: also submitted it already to support)

Usecase: server-tabs, thus with simple if-blocks I show webblocks or not.

scenario 1: when having no activetab it works ok.

scenario 2: when having a activetab filled in, the form doesn;t get filled in when going to there

To my best knowledge the code is not faulty (not the best as well, but hey :) )

I have no clue how to solve this, but to go back to editrecord instead of the form, since I am afraid it's due to some wierd optimilisations by Outsystems.

Any other suggestions would be grateful...


Hi J,

You can work around this issue by adding an assignment on the preparation of the FormWebblock with something like:

SomeEntityForm.Record = GetSomeEntities.List.Current

Going into details: The reason why this happens is because we only assign the Form variable once, as explained in the documentation. In short, when you refresh a form we don't want to erase what the user inputed, because in most cases this is not the desired behavior.

That computation appears to be wrong for this particular scenario, and that's why the Form variable isn't being assigned... I'll submit the issue to our team.

Hope this helps,