FormItems.Find
Syntax:
Parameters:
<Description> (required)
Form element description.
Returned value:
Control on form If the element is not found, then the value Undefined is found.
Description:
Availability:
Example:
Procedure ActiveAttributInForm(DocumentForm) Export // Structure - order of attributes activisation. // First unfilled activates. AttributesStructure = New Structure; AttributesStructure.Insert("Date"); AttributesStructure.Insert("Number"); AttributesStructure.Insert("Organization"); AttributesStructure.Insert("Bank"); AttributesStructure.Insert("BankAccount"); AttributesStructure.Insert("Warehouse"); AttributesStructure.Insert("Contractor"); AttributesStructure.Insert("Receiver"); AttributesStructure.Insert("Payer"); AttributesStructure.Insert("PhysBody"); For each Item In AttributesStructure Do //Define whether control with this name exists CI = DocumentForm.Controls.Find(Item.Key); If CI <> Undefined Then // there is such an element If NOT ValueIsFilled(CI.Value) Then // there is no such element // make it current and break the cycle DocumentForm.CurrentControl = CI; Break; EndIf; EndIf; EndDo; EndProcedure |