PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

This content has been translated automatically. Click here to view the French version.
  • Use conditions
  • Characteristics of a row
  • Browsing Table or TreeView Table control: Modifications in the linked data file
  • Modifications performed in a browsing Table or TreeView Table control
  • Modifying a record in a browsing Table control and releasing a Trigger
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Modifies a row in:
  • a Table control,
  • a TreeView Table control,
Remark: It is recommended to use the TableModifyLine. TableModifyLine is used to add:
  • TAB characters into the columns,
  • all types of values into the columns.
Versions 16 and later
Linux This function is now available for WINDEV applications in Linux.
New in version 16
Linux This function is now available for WINDEV applications in Linux.
Linux This function is now available for WINDEV applications in Linux.
Versions 18 and later
WEBDEV - Server codePHP This function can now be used to handle TreeView Table controls in WEBDEV and PHP sites.
New in version 18
WEBDEV - Server codePHP This function can now be used to handle TreeView Table controls in WEBDEV and PHP sites.
WEBDEV - Server codePHP This function can now be used to handle TreeView Table controls in WEBDEV and PHP sites.
Versions 19 and later
WEBDEV - Browser code This function is now available in Browser code for Table controls in browser mode.
New in version 19
WEBDEV - Browser code This function is now available in Browser code for Table controls in browser mode.
WEBDEV - Browser code This function is now available in Browser code for Table controls in browser mode.
Example
// Modification des éléments "Paul" et "Dubois" de la cinquième
// ligne du champ "TABLE_TableClient"
TableModify(TABLE_TableClient, "Paul" + TAB + "Dubois", 5)
// Modification dans une colonne d'un champ Table
TableModify(COL_NOM, "Dubois", 5)
Syntax
TableModify(<Table control> , <Row> [, <Subscript>])
<Table control>: Control name
Name of the control to be used. This control can correspond to:
  • a Table control.
  • a TreeView Table control.
If this parameter corresponds to an empty string (""), the control used will be the control to which the current event belongs.
<Row>: Character string
Modified row replacing the specified row. This row has the following format:
<Elément de la colonne 1> + TAB + <Elément de la colonne 2> + TAB + ...
<Subscript>: Optional integer
Subscript of row to modify. The value of first row is set to 1.
Subscript not specified or equal to -1The current row is modified. This constant has no effect if no row is selected.
Subscript greater than the number of control rowsA WLanguage error occurs.
Remarks

Use conditions

TableModify can be used on:
  • a browsing or memory control,
  • a single-selection or multi-selection control.
    WEBDEV - Server codePHP Reminder: Multiselection is not available for classic Table controls.
WEBDEV - Server codePHP This function is available for Table controls in Ajax mode, Table controls in classic mode and TreeView Table controls.
WEBDEV - Browser code This function is available for Table controls in browser mode only.
WEBDEV - Browser code The TreeView Table control is not available.
WEBDEV - Browser code The TreeView Table control is not available.

Characteristics of a row

  • Each row element is changed into the type of the associated column.
  • If one of the elements corresponds to an empty string ("") or to 0 (depending on the column type), its value will be overwritten.
    For example:
    TableModify(TABLE_TableClient, "Dubois" + TAB + "Pierre" + TAB + "" + ...
    TAB + "21/06/72")
  • If an element corresponds to the calculation result, the numeric expression must be enclosed in brackets.
    For example:
    TableModify(TABLE_TableCalcul, (53+29) + TAB + (83-21))
  • To modify the value of an element in a row, use the following syntax:
    NomTable.NomColonne[IndiceLigne] = NouvelleValeur
WEBDEV - Server codePHP

Browsing Table or TreeView Table control: Modifications in the linked data file

If the cascading input is enabled, the data file linked to the control is automatically modified when the user goes to the next row.
If the cascading input is not enabled, the data file linked to the control is not modified. To write the record into the linked data file, TableSave must be called after TableModify.
Remarks:
  • The "Cascading input" option can be selected in the "Details" tab of the control description window.
  • Versions 19 and later
    WEBDEV - Server code The cascading input is available for Ajax browsing Table controls only.
    New in version 19
    WEBDEV - Server code The cascading input is available for Ajax browsing Table controls only.
    WEBDEV - Server code The cascading input is available for Ajax browsing Table controls only.

Modifications performed in a browsing Table or TreeView Table control

To modify a row in a browsing Table or TreeView Table control, we advise you to:
  • modify the record in the data file with HModify,
  • use the function TableDisplay to re-update the control .
WEBDEV - Server code

Modifying a record in a browsing Table control and releasing a Trigger

You have the ability to activate a trigger when modifying a record in a browsing Table control. For more details, see the documentation about HDescribeTrigger.
Component: wd270obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment