4D v16.3

Current form name

Home

 
4D v16.3
Current form name

Current form name 


 

Current form name -> Function result 
Parameter Type   Description
Function result  Text in Name of current project form or current table form in the process

The Current form name command returns the name of the current form defined for the process. The current form can be a project form or a table form. 

By default, if you have not called the FORM LOAD command in the current process, the current form is the one being displayed or printed. If you have called the FORM LOAD command in the process, the current form is the one set by this command and it remains so until you call FORM UNLOAD (or CLOSE PRINTING JOB).

If there is no current form defined for the process, the command returns an empty string.

In an input form, place the following code in a button:

 C_TEXT($FormName)
 $win:=Open form window([Members];"Input";Plain form window)
 DIALOG([Members];"Input")
 $FormName:=Current form name
  // $FormName = "Input"
 FORM LOAD([Members];"Drag")
 $FormName:=Current form name
  // $FormName = "Drag"
  //...

You want to get the current form if it is a project form:

 $PointerTable:=Current form table
 If(Nil($PointerTable)) // this is a project form
    $FormName:=Current form name
    ... // processing
 End if



See also 

FORM LOAD

 
PROPERTIES 

Product: 4D
Theme: Forms
Number: 1298

 
HISTORY 

Created: 4D v14

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)