ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • Finding out the value returned by a child window
  • Limitations
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The ReturnedValue property is used to:
  • Get and change the value returned by a window, page or report.
  • Get and change the value returned by an option in a Radio Button control.
WINDEV Reminder A window opened by function Opens can return a result when closed. This value is returned:
  • by the Result keyword in the window closing code,
  • by the Closes function,
    Note The Closes function can be used to return several values.
  • by the ReturnedValue property used before closing the window.
WEBDEV - Server code Reminder A page opened by function PageDisplayDialog may return a result when closed. This value is returned:
  • by the Result keyword in the page closing code,
  • by the PageCloseDialog function,
  • by the ReturnedValue property used before closing the page,
  • by the ContextClose function.
AndroidiPhone/iPadIOS Widget Used on the MyChildWindow keyword, the ReturnedValue property is used to get the value returned by a child window in a mobile application.
WINDEViPhone/iPadIOS Widget Reminder A report printed by function iPrintReport can return a result at the end of its printing. This value is returned:
  • by the Result keyword in the report closing code,
  • by the ReturnedValue property used before closing the report.
WEBDEV - Browser code The ReturnedValue property gets and sets the value returned by a popup in a Combo Box Popup control.
Example
WINDEVJava
// Code permettant d'ouvrir la fenêtre "FEN_SaisieMotDePasse"
MonMotDePasse = Open(FEN_SaisieMotDePasse)
IF MonMotDePasse <> "" THEN
	Info("Mot de passe incorrect")
END

// --------------------------------------------------------------------------------
// -- Code de clic sur le champ Bouton "OK" de la fenêtre "FEN_SaisieMotDePasse"
// L'utilisateur saisit son mot de passe dans le champ "SAI_MotDePasse"
// et valide la fenêtre
Close()

// --------------------------------------------------------------------------------

// -- Code de fermeture de la fenêtre
FEN_SaisieMotDePasse.ValeurRenvoyée = SAI_MotDePasse
AndroidiPhone/iPadIOS Widget
// Evénement "Fermeture d'une fenêtre fille de FEN_Liste_Clients"
// -------------------------------------------------------------
// Actualise la liste des clients
LooperDisplay(ZR_Clients, taReExecuteQuery)

// Pour tout retour (sauf la suppression)
IF MyChildWindow.ValeurRenvoyée <> -1 THEN
	nIndice is int
	// Recherche la ligne du client
	nIndice = LooperSearch(ATT_NumClient, Client.NumClient)
	IF nIndice > 0 THEN
		// Positionne sur la ligne du client
		LooperPosition(ZR_Clients, nIndice)
	END
END
Syntax

Finding out the returned value Hide the details

<Result> = <Element used>.ReturnedValue
<Result>: Any type
Value that will be returned:
  • when closing the current window, page or report.
  • if the option is selected in the radio button.
<Element used>: Name of window, page, report, option
Name of element used:
  • Name of the window, page, report or internal report used. This window, page or report must be opened.
  • Name of the option in the radio button. This name is of the form: <Selector Field>[<Option Number>].

Modifying the returned value Hide the details

<Element used>.ReturnedValue = <New value>
<Element used>: Name of window, page, report, option
Name of element used:
  • Name of the window, page or report used. This window, page or report must be opened.
  • Name of the option in the radio button. This name has the following format: <Radio Button control>[<Option number>].
<New value>: Any type
New value to return. The following types can be used:
  • structure
  • dynamic structure
  • class
  • advanced type
  • array
  • associative array
  • queue
  • stack
  • list
Remarks
AndroidiPhone/iPadIOS Widget

Finding out the value returned by a child window

In the mobile applications, the windows are opened by OpenMobileWindow (or OpenChild) instead of Opens.
You can get the value returned by a child window in the "Close a child window" event of the window that opened it (the one that called OpenMobileWindow or OpenChild).
For example:
  • In the closing code of the child window, Closes is used to return a parameter:
    Close("", MonParamètre)
  • The name of the child window as well as the returned value can be retrieved in the "Close a child window" event of the calling window, using the MyChildWindow keyword:
    // Fermeture d'une fenêtre fille
    NomFenêtreFille = MyChildWindow.Nom
    ValeurFenêtreFille = MyChildWindow.ValeurRenvoyée

Limitations

The ReturnedValue property is applied:
  • WINDEVAndroidAndroid Widget Java windows,
  • WEBDEV - Server code pages,
  • WINDEVAndroidJava options in Radio Button controls.
  • WINDEV internal windows only if they are opened with Opens.
  • WINDEVReports and QueriesiPhone/iPadIOS Widget reports.
  • WINDEVReports and QueriesiPhone/iPadIOS Widget internal reports (in read-only).
  • WEBDEV - Browser code popups used via a Popup Combo Box control.
Related Examples:
Popup calendar Unit examples (WINDEV): Popup calendar
[ + ] Using a calendar that can be used by the OpenPopup function.
The PopCalendar window is very useful in the applications containing date controls.
Indeed, the PopCalendar window allows you to choose a date visually.
The risk of error is reduced as the user can see the day of the week corresponding to the selected date.
Then, the date control is filled with the value returned by the PopCalendar window.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 10/08/2025

Send a report | Local help