Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
there is one app where this checkbox has to be active for some value (the type of Ledger). For some reason which I don't know in detail, there has to be data available for several different ledgers - but on the GUI only one should be displayed which is currently realized by use of this checkbox.
The issue is, there is a possibility to inadvertently remove this (by removing all values from the app for some reason).
=> Is there a way to technically inhibit this?
Thanks a lot!
Best regards,
DataNibbler
Hi,
Using set-expression you can override any selections made to show more or less than what is selected in the filters. Do you know which ledgers should be shown, or should all be shown?
Thanks! I have to ask - since I don't know exactly why all data must be available, I'm not sure about what should be shown in full or not ... I think there are different states in that app, but I need to have a look.
Thanks a lot!
Best regards,
DataNibbler
I'm not really sure but I don't think there is a general purpose remedy that works in all situations. Even the Distribution engine has this problem when clearing all data at the beginning of a reload. However, by being closely integrated it is able to save those settings before the reload, and reapply them afterwards.
Can you change your intent to "removing all values from the app for some reason" into "loading dummy data to maintain the Always One Selected settings"? As long as there is some data in your data model, you won't lose "Always One Selected".
If you can't do as Peter suggested, you can also try running a macro at opening that set the OneAndOnlyOne member in the IFieldProperties, something like (untested):
'Macro need to check if only one value is selected or select a start value, not shown here
set fld=ActiveDocument.GetField("Class")
if fld.GetValueCount(1) = 1 then
set fprop = fld.GetProperties
fprop.OneAndOnlyOne = true
fld.SetProperties fprop
end if