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.
  • Finding out the value returned by a child window
  • Limits
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
ReturnedValue is used to:
  • Find out and modify the value returned by a window, a page or a report.
  • Find out and modify the value returned by an option in a Radio Button control.
WINDEV Reminder: A window opened by Open may return a result when it is closed. This value is returned:
  • by the Result keyword in the window closing code,
  • by Close,
  • or by the Property ReturnedValue used before closing the window.
Universal Windows 10 App Used on the MyChildWindow keyword, the ReturnedValue property allows to retrieve the value returned by a child window in a mobile application.
Versions 19 and later
WINDEVUniversal Windows 10 App Reminder: A report printed by iPrintReport may return a result at the end of its print. This value is returned:
  • or by the Resend keyword in the report closing code,
  • or by the Property ReturnedValue used before the closure of the report.
New in version 19
WINDEVUniversal Windows 10 App Reminder: A report printed by iPrintReport may return a result at the end of its print. This value is returned:
  • or by the Resend keyword in the report closing code,
  • or by the Property ReturnedValue used before the closure of the report.
WINDEVUniversal Windows 10 App Reminder: A report printed by iPrintReport may return a result at the end of its print. This value is returned:
  • or by the Resend keyword in the report closing code,
  • or by the Property ReturnedValue used before the closure of the report.
Versions 18 and later
Universal Windows 10 App This property is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This property is now available in Windows Store apps mode.
Universal Windows 10 App This property is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Example
WINDEVJava
// Code permettant d'ouvrir la fenêtre "FEN_SaisieMotDePasse"
MonMotDePasse = Ouvre(FEN_SaisieMotDePasse)
SI MonMotDePasse <> "" ALORS
Info("Mot de passe incorrect")
FIN
 
// --------------------------------------------------------------------------------
// -- 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
Ferme()
 
// --------------------------------------------------------------------------------
 
// -- Code de fermeture de la fenêtre
FEN_SaisieMotDePasse.ValeurRenvoyée = SAI_MotDePasse
Versions 18 and later
Universal Windows 10 App
// Event "Closing a child window of WIN_List_Customers"
// -------------------------------------------------------------
// Refreshes the list of customers
LooperDisplay(LOOP_Customers, taReExecuteQuery)
 
// For any return (except for the deletion)
IF MyChildWindow.ReturnedValue <> -1 THEN
nSubscript is int
// Finds the customer row
nSubscript = LooperSeek(ATT_CustomerNum, Customer.CustomerNum)
IF nSubscript > 0 THEN
// Positions on the customer row
LooperPosition(LOOP_Customers, nSubscript)
END
END
New in version 18
Universal Windows 10 App
// Event "Closing a child window of WIN_List_Customers"
// -------------------------------------------------------------
// Refreshes the list of customers
LooperDisplay(LOOP_Customers, taReExecuteQuery)
 
// For any return (except for the deletion)
IF MyChildWindow.ReturnedValue <> -1 THEN
nSubscript is int
// Finds the customer row
nSubscript = LooperSeek(ATT_CustomerNum, Customer.CustomerNum)
IF nSubscript > 0 THEN
// Positions on the customer row
LooperPosition(LOOP_Customers, nSubscript)
END
END
Universal Windows 10 App
// Event "Closing a child window of WIN_List_Customers"
// -------------------------------------------------------------
// Refreshes the list of customers
LooperDisplay(LOOP_Customers, taReExecuteQuery)
 
// For any return (except for the deletion)
IF MyChildWindow.ReturnedValue <> -1 THEN
nSubscript is int
// Finds the customer row
nSubscript = LooperSeek(ATT_CustomerNum, Customer.CustomerNum)
IF nSubscript > 0 THEN
// Positions on the customer row
LooperPosition(LOOP_Customers, nSubscript)
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 has the following format: <Radio Button control>[<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
Versions 18 and later
Universal Windows 10 App

Finding out the value returned by a child window

In the mobile applications, the windows are opened by OpenMobileWindow (or OpenChild) instead of Open up.
It is possible to know the value returned by a child window in the "Close child window" event of the window opening the child window (the one that used the OpenMobileWindow function or the OpenChild function).
For example:
  • In the closing code of the child window, ferme is used to return a parameter:
    Close("", MyParameter)
  • The name of the child window as well as the returned value can be retrieved in the event "Closing a child window" of the calling window, using the MyChildWindow keyword:
    // Close a child window
    NameChildWindow = MyChildWindow.Name
    ValueChildWindow = MyChildWindow.ReturnedValue
New in version 18
Universal Windows 10 App

Finding out the value returned by a child window

In the mobile applications, the windows are opened by OpenMobileWindow (or OpenChild) instead of Open up.
It is possible to know the value returned by a child window in the "Close child window" event of the window opening the child window (the one that used the OpenMobileWindow function or the OpenChild function).
For example:
  • In the closing code of the child window, ferme is used to return a parameter:
    Close("", MyParameter)
  • The name of the child window as well as the returned value can be retrieved in the event "Closing a child window" of the calling window, using the MyChildWindow keyword:
    // Close a child window
    NameChildWindow = MyChildWindow.Name
    ValueChildWindow = MyChildWindow.ReturnedValue
Universal Windows 10 App

Finding out the value returned by a child window

In the mobile applications, the windows are opened by OpenMobileWindow (or OpenChild) instead of Open up.
It is possible to know the value returned by a child window in the "Close child window" event of the window opening the child window (the one that used the OpenMobileWindow function or the OpenChild function).
For example:
  • In the closing code of the child window, ferme is used to return a parameter:
    Close("", MyParameter)
  • The name of the child window as well as the returned value can be retrieved in the event "Closing a child window" of the calling window, using the MyChildWindow keyword:
    // Close a child window
    NameChildWindow = MyChildWindow.Name
    ValueChildWindow = MyChildWindow.ReturnedValue

Limits

Property ReturnedValue applies:
  • WINDEVUniversal Windows 10 AppJava windows,
  • WINDEVUniversal Windows 10 AppJava options found in Radio Button controls.
  • Versions 19 and later
    WINDEV internal windows only if they are opened with Open up.
    New in version 19
    WINDEV internal windows only if they are opened with Open up.
    WINDEV internal windows only if they are opened with Open up.
  • Versions 20 and later
    WINDEVUniversal Windows 10 App reports.
    New in version 20
    WINDEVUniversal Windows 10 App reports.
    WINDEVUniversal Windows 10 App reports.
  • Versions 20 and later
    WINDEVUniversal Windows 10 App internal reports (in read-only).
    New in version 20
    WINDEVUniversal Windows 10 App internal reports (in read-only).
    WINDEVUniversal Windows 10 App internal reports (in read-only).
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