Initial values of a new record

Initial values of a new record

  
How to set initial values of a new record, that will be visible and (maybe) editable? I've tried to do it by setting the values of appropriate attributes of <form>.Record.<entity> inside the Preparation stage. At the end of this stage all the attributes have their expected values. But these values are then automatically cleared by “somebody” and the UI widgets (that are, of course, bound to attributes of the <entity>) still have their null values. If I bind a widget to some local variable and set this variable in Preparation, all works well. It’s a workaround but not an expected solution.
Hi Tomasz,

Your form has a source that binds with the output of the aggregate, so when the page renders it will fetch that aggregate list and then ends up overriding your <form>.Record.<entity> assigns in Preparation. You should do that assign in Preparation to the <aggregate/query>.list.<entity> instead.

Great. Works. Thanks :-)