4D v16.3

Standard actions

Home

 
4D v16.3
Standard actions

Standard actions  


 

 

This section discusses each standard action that can be assigned to a button and to certain active form objects (or to menu commands, see Specifying the action of a menu).

  • No Action: Use a No Action button for a button that does not perform a standard action. Choose No Action when you need to write a method to manage the button. For example, a button that displays a custom Find dialog box in a custom application would have a No Action standard action because you must write a method to open the custom dialog box.
  • Accept and Cancel: Clicking an Accept button saves a record. It triggers either On Saving New Record Event or On Saving Existing Record Event as well as the On Validate form event . Clicking a Cancel button exits the current record without saving any changes. 
  • Delete Record: Clicking a Delete Record button displays an alert asking the user to confirm the deletion. Clicking Yes in the alert deletes the current record. If the user is using the input form for a subrecord, Delete Record deletes the current subrecord. After the user clicks a Delete Record button, 4D automatically returns to the output display.
    Note: An object with this action is automatically disabled when a new record is being added.
  • Record navigation actions: The Next Record, Previous Record, First Record, and Last Record actions first accept the current record and then make the specified record current. The specific record made current by these buttons depends on the sort order.
    These actions are applied to subrecords when the user is entering subrecords.
    An object of this type is automatically disabled when its action is inappropriate. For example, if the user displays the first record, the First Record and Previous Record buttons would be disabled.
  • Page navigation actions: The First Page, Last Page, Next Page, and Previous Page actions display the appropriate page in a multi-page form. If there is only one page, these buttons are disabled.
    An object of this type is automatically disabled when its action is inappropriate. For example, if the user displays the first page, the First Page button would be disabled.
  • Edit Subrecord: This action can be used in three contexts: list boxes, subforms and list forms displayed using the MODIFY SELECTION / DISPLAY SELECTION commands or in the records display window in Design mode.
    • List boxes: A button associated with the Edit Subrecord standard action is automatically enabled when at least one row of a "selection" type list box is selected (see Using standard actions).
    • Subform: Placed in the form of a parent record, this button is active when a record of the subform is selected. If the user selects a subrecord and then clicks the Edit Subrecord button, the subrecord switches to editing mode, either directly in the list, or in the associated detail form (depending on the properties of the subform).
    • List forms: This button is active when a record is selected in the list. When a user clicks this button, the record switches to editing mode. With lists displayed via the MODIFY SELECTION / DISPLAY SELECTION commands, the modification is carried out in the list or on the detail page depending on the value of the enterList parameter. In the records display window, the modification is carried out on the detail page (the action is equivalent to a double-click).
  • Add Subrecord: This action can be used in three contexts: list boxes, subforms and list forms displayed using the MODIFY SELECTION / DISPLAY SELECTION commands or in the records display window in Design mode.
    • List boxes: A button associated with the Add Subrecord standard action is automatically enabled when there is at least one "selection" type list box in the form (see Using standard actions). 
    • Subform: Placed in the form of a parent record, this button is active when a record of the subform is selected. When the user clicks this button, 4D creates a new record in the table or related table, either directly in the list, or in the associated detail form (depending on the properties of the subform).
    • List forms: This button is always active. When the user clicks this button, a new blank record is created. With lists displayed using the MODIFY SELECTION / DISPLAY SELECTION commands, the record is added in the list or in the detail page depending on the value of the enterList parameter. In the records display window, the record is added to the list.
  • Delete Subrecord: This action can be used in three contexts: list boxes, subforms and list forms displayed using the MODIFY SELECTION / DISPLAY SELECTION commands or in the records display window in Design mode.
    • List boxes: A button associated with the Delete Subrecord standard action is automatically enabled when at least one row of a "selection" type list box is selected in the form (see Using standard actions). 
    • Subform: Placed in the form of a parent record, this button is active when a subrecord has been selected in a subform.
    • List forms: This button is active when at least one record is selected in the list. When the user clicks this button, a dialog box appears, which can be used to confirm or cancel the deletion.
    For more information about using buttons in subforms, refer to .
  • Automatic Splitter: This standard action allows you to create custom splitters on a form. It can only be assigned to an invisible button (see Buttons). When an invisible button is assigned this action, it behaves in the same way as a splitter. By pasting for example a picture in the invisible button, you can create any type of custom interface for your splitters. For more information about splitters, refer to Splitters.
  • Undo: Cancels the last action performed (=Undo command of the Edit menu). Undo should not be confused with Cancel (= cancels any modifications made to a record during its viewing and returns to the Output form).
  • Redo: Repeats the last action cancelled (= Redo command of the Edit menu).
  • Cut: Removes the selection and places it in the Clipboard.
  • Copy: Places a copy of the selection in the Clipboard.
  • Paste: Inserts the contents of the Clipboard at the location of the insertion point.
  • Clear: Deletes the selection. If nothing is selected, it erases the entire area containing the cursor (enterable areas only).
  • Select All: Selects all of the selectable elements in the context.
  • Show Clipboard: Opens a new window that displays the current contents of the Clipboard.
  • Database Settings: Displays the standard Database Settings dialog box (see note below).
  • Application: Brings the windows and menu bars of the 4D Application environment to the foreground.
  • Quit: Displays an “Are you sure?” confirmation dialog box, then exits the 4D application if validation occurs. Otherwise, the operation is cancelled.
    When this action is assigned to a button with which an object method is also associated, the following sequence is executed: first, the confirmation dialog box appears. If it is validated, 4D executes the object method. After its execution, the application quits.
    Note Mac OS: Under Mac OS X, the menu commands associated with the Database Settings and Quit actions are automatically placed in the application system menu, when the database is running in this environment. This mechanism simplifies the management of the Quit command under Mac OS X.
  • Return to Design mode: Brings the windows and menu bars of the 4D Design environment to the foreground.
    When the database is running in interpreted mode, this displays the current window of the Design environment. When the database is running in compiled mode, this displays the records window of the current table (in compiled mode, only access to records is possible).
  • MSC: Displays the Maintenance and security center window.
  • Goto Page: Only available for Tab Control, List Box, Button Grid and Pop-up Menu objects. When this action is enabled, 4D automatically displays the form page that corresponds to the number of the selected item (tab control, row, button, etc.). For more information, refer to Goto Page action).

The following actions can be used in the context of a form containing a Web area (for more information about this type of object, refer to Web areas).

  • Open Back URL: This action opens the previous URL in the browsing sequence carried out by the user in the Web area. If there is no previous URL, in other words, if the user has only displayed a single page in the area, the associated button or menu command is disabled. 
  • Open Next URL: This action opens the next URL in the browsing sequence carried out by the user in the Web area. If there is no next URL, in other words, if the user has never gone back a page in the sequence, the associated button or menu command is disabled. 
  • Refresh Current URL: This action reloads the current contents of the Web area.
  • Stop Loading URL: This action stops loading the page and/or objects of the current URL in the Web area.



See also 

Specifying the action of a menu
Using standard actions

 
PROPERTIES 

Product: 4D
Theme: Properties for active objects

 
HISTORY 

 
ARTICLE USAGE

4D Design Reference ( 4D v16)
4D Design Reference ( 4D v16.1)
4D Design Reference ( 4D v16.3)