Question
How to expand (collapse) Vendor field group if the VendorId is empty?
How to expand (collapse) field group on form based on field value?
How to expand (collapse) field group on form with condition ...
Answer
You may use script to control document form behavior. It can be set up in FlexiCapture project properties at "General" tab under "Tools" section:
in Project Setup Station main menu > Project > Properties... > "General" tab > click "Edit tool..." button > click "Add event..." or edit existing event > select the event type from dropdown list > click "Edit script..." button to open script editor window
Refer to IFieldControl scripting object properties "IsExpandable" and "IsExpanded".
Note. The scripts are only executed at Verification Station so could only be tested there.
The approach is not applicable at Web Verification Station.
Example.
//sample script in C# for "On Activate Document" event handler/*adding the condition that the field "TriggerFieldName" should not be empty*/
if (DocumentEditor.Document.Field("DocumentSectionName\\TriggerFieldName").Text != ""){
/*if condition is satisfied, the field "TargetGroupFieldName" should be expanded on form*/
DocumentEditor.FormWindow.DocumentWindow.FormWindow.get_FindControl(DocumentEditor.Document.Field("DocumentSectionName\\TargetGroupFieldName")).IsExpanded=true;
}
Comments
0 comments
Please sign in to leave a comment.