In DOM how can I set the functionality for a field to accept multiple custom string value.
I am creating a DOM for configuration which already as three sections
Location, Make and Model, Device
I want to add another section which is to select protocol and select resources types which is multiselect select list, so I want to save as
This Protocol, This version , These resource types
Resource Types I am getting is from engine.GetUserConnection().GetProtocol().AllPAramaters
How can I get this done for DOM and also in script
Hi Apurva,
The note on the bottom of this section of the following page on the documentation shows what FieldDescriptors allow multiple values and from which version onwards. https://docs.dataminer.services/user-guide/Advanced_Modules/DOM/DOM_objects/DOM_SectionDefinition.html#fielddescriptor
I think you are refering to a string FieldDescriptor, for this FieldDescriptor, multiple values are not allowed.
Depending on your use-case, you could add the field to a section that is allowed to be added multiple times to an instance. You can find more info for that on the Note on this page in the documentation: https://docs.dataminer.services/user-guide/Advanced_Modules/DOM/DOM_objects/DomDefinition.html#sectiondefinitionlink
You could save the resource types in a GenericEnumFieldDescriptor. This allows selection of pre-defined values. This FieldDescriptor currently doesn’t allow multiple values however, but this will be available in the near future. I will post an update here when I can confirm the availibilty of multiple values for the GenericEnumFieldDescriptor
Fine, but this won’t solve as it is predefined and I want it dynamic
As on selection of protocol name I want to show list of resource types availble to it for user to multiselect and this should be saved in DOM
For eg.
Instance 1
Protocol Name: Appear TV Protocol
Protocol Version: 1.2.14
Resource Types: S2xInput, S2XDemod, etc
Instance 2
Protocol Name: Ateme Titan Edge
Protocol Version: 1.2.16
Resource Types: S2xInput, Decoder, etc
Dynamic fields for DOM do not currently exist. To achieve what you want, I would suggest to use an interactive automation script (https://docs.dataminer.services/user-guide/Advanced_Modules/Automation_module/Using_CSharp/Building_interactive_Automation_scripts_with_CSharp.html). In an interactive automation script you’ll be able to make a multiselect dialog box that you can fill with the values that match for the protocol, and you can fill in these values in a GenericEnum Field, that would contain all possibilities as the predefined types, but your UI in the interactive automation script, will only show the appropriate types according to the selected protocol.
Hi Thanks,
I am creating a DOM for configuration which already as three sections
Location, Make and Model, Device
I want to add another section which is to select protocol and select resources types which is multiselect select list, so I want to save as
This Protocol, This version , These resource types
Resource Types I am getting is from engine.GetUserConnection().GetProtocol().AllPAramaters
How can I get this done for DOM and also in script