Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have an application which has many list boxes for selecting values. One of the list boxes has 100+ entries. If a user does not select at least one value from this list and at least one YEAR the server bogs down for all apps. The database has millions of rows with many fields and values. The General Tab for List Box Properties has a check box for requiring one value to be selected but only one value. I need the ability to require AT LEAST one value, but to have the option of selecting two or more selections.
Any suggestions?
In the document properties, set an "On Open" action of "Select in Field" that pre-selects a value from the list field (lets call it BigList), i usually find either
=max(Biglist)
or
=min(BigList) works fine
On all your other objects within the document set a "caluclation condition" of
GetSelectedCount(Year)>0 and GetSelectedCount(BigList)>0
and that object wont even attempt to calculate until something is elected in either field
You could do it with a macro OnSelect and OnChange of the field:
sub AtLeastOne()
set field = ActiveDocument.GetField("ID")
if field.GetSelectedValues.Count < 1 then
field.select ActiveDocument.Evaluate("=minstring(ID)")
end if
end sub
Better if there's a way to do it with an action, but I'm not thinking of how. Not very experienced with actions yet.
The approach I usually take is to place a calulation condition on the objects that are slow if the selections are not made. Then set a custom message that informs the user "Please select at least one Year and a value".
-Rob