KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Detecting if a form exists
PRODUCT: 4D | VERSION: | PLATFORM:
Published On: March 11, 1999

One interesting use of the new V6.5 GET FORM PROPERTIES command is that you can use it to detect if a form exists in the database. In the first two parameters of this command you specify the table where the form would be located and the name of the form. If the form does not exist, the command will return zero for the form's width and height (in the third and fourth parameters). If the form exists, the values returned in those parameters will always be at least 1.
With this capability, you can construct a database shell that uses a custom form if it exists, and defaults to using a generic form in the shell if the specified custom form does not exist.