| 
                    
 This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com  | 
            |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
                 
                
  | 
                
					
                    
                         
    4D v20.6
 
Table name 
                                
                                
        
 | 
                ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Table name ( tableNum | tablePtr ) -> Function result | ||||||||
| Parameter | Type | Description | ||||||
| tableNum | tablePtr | Longint, Pointer | 
             
         | 
        Table number or Table pointer | |||||
| Function result | String | 
             
         | 
        Name of the table | |||||
The Table name command returns the name of the table whose number or pointer you pass in tableNum or tablePtr.
The following is an example of a generic method that displays the records of a table. The reference to the table is passed as a pointer to the table. The Table name command is used to include the name of the table in the title bar for the window:
  ` SHOW CURRENT SELECTION Project method
  ` SHOW CURRENT SELECTION ( Pointer )
  ` SHOW CURRENT SELECTION (->[Table])
 
 SET WINDOW TITLE("Records for "+Table name($1)) `Sets the window title
 DISPLAY SELECTION($1->) `Displays the selection
									Field name
									
									Get last table number
									
									SET FIELD TITLES
									
									SET TABLE TITLES
									
									Table
									
	Product:  4D
	Theme:  Structure Access
	Number:  
        256
        
        
        
	
	Created:  < 4D v6
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	4D Language Reference ( 4D v20)
	
	
	4D Language Reference ( 4D v20.1)
	
	
	
	4D Language Reference ( 4D v20.2)
	
	4D Language Reference ( 4D v20.3)
	
	4D Language Reference ( 4D v20.4)
	
	
	4D Language Reference ( 4D v20.5)
	4D Language Reference ( 4D v20.6)
	
	
	
Add a comment