Hi,
Imagine I have the following scenario:
I have a DOM model that associates a specific channel (e.g., V Sport 2) to other tables, such as "Ott Info" (first table) and "Broadcast Details" (second table).
What I would like to do in the LCA (Low Code App) is to have an "Add" button that allows me to add a row to the table where I want to input information.
What I did was the following:
I created a panel and added a "form" by dragging the desired "object manager definition."
Additionally, I placed the option to "SAVE" and "CLOSE" at the top of the panel.
Then, on the "Add" button of my table, I added the following action, so that when the user clicks the button, the form opens.
When the user adds the desired settings to the form and clicks the "SAVE" button on the panel, I want to save it in the DOM.
To accomplish this, I require an automation script that links the data entered by the user on the screen to the selected channel (the first dropdown).
I'm not sure how to do this. I was trying to do the following:
When the user clicks on "SAVE" (panel button), I will create a new DomInstance with the data from the form. Then, I invoke a script called "AddLinkToChannelService", which requires two parameters:
The GUID of the selected channel (retrieved via dropdown) => this is OK
The GUID of the new DomInstance that I want to link ("FkLink").
How do I fill/know what this GUID is?
Hi José
Would it be an option to link your AddLinkToChannelService script to the OnCreate property of the DOM Module Settings object? If the GUID of the selected channel is available in the DOM instance, this could be a solution I guess. The GUID of the DOM instance is passed to the AddLinkToChannelService script by the entry point method. You'll still need to add this entry point method to your script to make it work. More info about the Module Settings object can be found here https://docs.dataminer.services/user-guide/Advanced_Modules/DOM/DOM_ModuleSettings/ExecuteScriptOnDomInstanceActionSettings.html
Linking your script to the OnCreate property can be done quickly through the DOM Editor script. Please have a look here as well https://docs.dataminer.services/user-guide/Advanced_Modules/DOM/DOM_DevOps_tools.html
Kind regards
Hi Michiel,
Indeed, if the “child” DOM instance knew to which channel it belonged, I could add the script in the “OnCreate” and establish the link. However, in our use case, the user has already selected the desired channel and is viewing information and creating items for that channel.
It would be awkward to display, once again in the form, the channel to which the information being created belongs.
The ideal scenario would be to have access to the GUID of the DOM instance we just created and use that as a “feed” for an automation script. I’m going to request this “feature” to our software team