Pawel Moderator

Joined: 27 Jul 2005 Posts: 759
|
Posted: Wed Jul 28, 2010 10:47 pm Post subject: |
|
|
There is no built in property for this at this time.
It would involve a number of lookups:
1) get current form design name
FormDesignName = Application.FormDesign
2) get form design's linked
FormDesignMasterTableID =
... SELECT MasterTableID FROM SY_TEMPLATES WHERE TEMPLATENAME = Quoted(FormDesignName)
3) get table name from
FormDesignTableName =
... SELECT TABLENAME FROM SY_TABLENAMES WHERE ID = FormDesignMasterTableID
However, since you are checking for "Mandatory" fields, it would probably be more appropriate to check whether a specific field is in fact on the Record tab, and this again would involve a number of lookups, linking form designs, screen elements, database fields, etc.
Rather than wirtting a "generic" ValidateAllMandatoryFields() macro function, I would suggest writting a function which takes a list of field names, that you know for a fact exist in the relevant form design, are visible on the Record tab, and are editable, and then validate only those fields. |
|