Hi,
I've got an DOM object that can have multiple "services" sections. Is there a way to have by default one option added and selected? (which also can be deleted, but in 98% of the cases we want to add this specific service)
Hi Gerwin,
On any FieldDescriptor, you can define a default value. (Last property in the table here) You could assign the value for that specific service there. This way, when you create a DomInstance in a form of a low-code app, it will already assign it as the value.
Does this answer your question?
We can probably leverage the OnDomInstanceCrud automation script entry point to create an initial section (https://docs.dataminer.services/user-guide/Advanced_Modules/DOM/DOM_ModuleSettings/ExecuteScriptOnDomInstanceActionSettings.html?q=OnDomInstanceCrud)?
You could use the CrudType to immediately return if it’s not equal to ‘Create’.
Oh, ok, I misunderstood. I do not fully understand what you mean by a default section. Are you creating your DomInstances in a low-code app form or a script?
When using the form, an initial section should be shown where the aforementioned default values should be filled in.
Could you explain your use-case in a bit more detail?
Sure we’ve got an DOM which is an Job entry form from our booking guys for our operational team, however sometimes there are services that are added to a job for our invoice department, there is one that is almost always added (unless otherwise noted) so i when i create a new instance with an lowcode app i would like to have an auto select on the first service name, which is an other dom instance list since we want to be able to give the bookings an easy way to add services)
Unfortunately not, i have the multiple on the section itself (it consist on a DOM instnace link, start and end datetime etc)
so yes most fields can have an default, exept the section itself (and not if it’s linked to another DOM instance)