ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Control functions
  • File variables
  • Initialization process
  • Table and Looper controls
  • Limitations
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Reinitializes:
  • all controls found in the current window or in the current page (including the groups of controls, the supercontrols, the popups and the internal windows).
  • the controls found in a group of controls, a supercontrol, a popup, an internal window or an internal page.
WEBDEV - Browser codePHP Reinitializes all the controls to their initial value. The initial value of controls corresponds to the value of controls during the last page display on the browser (first page display or display during a refresh operation, ...).
Example
// Add a customer
ScreenToFile()
HAdd(Customer)
// Reinitialize controls to enter a new customer
Reset(True)
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)Ajax
// Reinitialize controls in the "SC_Customer" supercontrol
// The list box, combo box, table and looper controls of this supercontrol 
// will keep their current content.
Reset(SC_Customer, True)
WEBDEV - Browser codePHP
// -- Browser click code of BTN_CANCEL
// Cancels the inputs performed in the form
Reset()
Syntax

Reinitializing all the controls in the current window or page Hide the details

RESET([<Management of Special controls>])
<Management of Special controls>: Optional boolean
  • True:
    • Edit controls and Static Text controls are reinitialized to their initial value,
    • List, Combo, Table and RepeatString fields (file or memory) are not cleared or reset.. They keep their current content.
  • False (default value):
    • Edit controls and Static Text controls are reinitialized to their initial value,
    • the List, Combo Box control, Table and RepeatString "memory" fields are cleared and reset to their initial contents,
    • browsing List Box, Combo Box, Table and Looper controls are only reinitialized (they are not cleared).
WEBDEV - Browser codePHP This parameter is not available: all page fields are reset to their initial values. The initial value of controls corresponds to the value of controls during the last page display on the browser (first page display or display during a refresh operation, ...).
WINDEVWEBDEV - Server codeWINDEV MobileReports and QueriesUser code (UMC)PHPAjax

Reinitializing all the controls found in a group of controls, a supercontrol, an internal window or an internal page Hide the details

RESET(<Element name> [, <Management of Special controls>])
<Element name>: Character string
Name of element whose controls will be reinitialized. Can correspond to:
  • Name of group of controls.
  • Name of supercontrol.
  • Name of internal window or page.
  • WEBDEV - Server code Name of control template.
  • WEBDEV - Server code Name of popup.
PHP Name of group of controls to reinitialize.
<Management of Special controls>: Optional boolean
  • True:
    • Edit controls and Static Text controls are reinitialized to their initial value,
    • List, Combo, Table and RepeatString fields (file or memory) are neither cleared nor reset.. They keep their current content.
  • False (default value):
    • Edit controls and Static Text controls are reinitialized to their initial value,
    • the List, Combo Box control, Table and RepeatString "memory" fields are cleared and reset to their initial contents,
    • browsing List Box, Combo Box, Table and Looper controls are only reinitialized (they are not cleared).
PHP This parameter is not available: all page fields are reset to their initial values. The initial value of controls corresponds to the value of controls during the last page display on the browser (first page display or display during a refresh operation, ...).
Remarks
WEBDEV - Server codePHPAjax

File variables

The HReset function is used to reset variables in HFSQL data files to zero. To reset only HFSQL data file variables in a page, use the following code:
HRESET(<Nom de fichier de données>)
FileToPage()
Warning If fields are associated with data file items, these items are marked with stars ("*").
WEBDEV - Server codeWEBDEV - Browser codePHPAjax

Initialization process

Do not confuse Reset and PageInitialization. Indeed:
  • Reset resets the controls
  • PageInitialization resets the controls and runs the initialization processes.
WEBDEV - Server codeWEBDEV - Browser codePHPAjax

Table and Looper controls

A Table or Looper control linked to a data file can never be empty. This control is automatically initialized with the values of the linked items in the data file.

Limitations

Reset does not reset the labels of the Button controls.
PHP Reset has no effect on the following controls:
  • Static Text control,
  • Button control,
  • Image control.
Component: wd300obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Video Reset
https://youtu.be/M-f668hriQ0

https://windevdesenvolvimento.blogspot.com/2019/04/dicas-2068-windev-mobile-webdev.html

// BTN_LIMPA_VARIAVEIS

Reset(GR_limpa)
amarildo
07 Apr. 2019

Last update: 12/06/2024

Send a report | Local help