PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Finding out the value returned by a child window
  • Limitations
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
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.
Universal Windows 10 AppAndroidiPhone/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.
Versions 19 and later
Universal Windows 10 AppiPhone/iPadIOS Widget Reminder: A report printed by iPrintReport may return a result at the end of the print job. This value is returned:
  • by the Return keyword in the report closing code,
  • by the ReturnedValue property used before closing the report.
New in version 19
Universal Windows 10 AppiPhone/iPadIOS Widget Reminder: A report printed by iPrintReport may return a result at the end of the print job. This value is returned:
  • by the Return keyword in the report closing code,
  • by the ReturnedValue property used before closing the report.
Universal Windows 10 AppiPhone/iPadIOS Widget Reminder: A report printed by iPrintReport may return a result at the end of the print job. This value is returned:
  • by the Return keyword in the report closing code,
  • by the ReturnedValue property used before closing the report.
Versions 15 and later
Android This property is now available for Android applications.
New in version 15
Android This property is now available for Android applications.
Android This property is now available for Android applications.
Versions 17 and later
iPhone/iPad This property is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This property is now available for iPhone/iPad applications.
iPhone/iPad This property is now available for iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This property is now available in Windows Store apps mode.
Android Widget This property is now available in Android widget mode.
New in version 18
Universal Windows 10 App This property is now available in Windows Store apps mode.
Android Widget This property is now available in Android widget mode.
Universal Windows 10 App This property is now available in Windows Store apps mode.
Android Widget This property is now available in Android widget 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
Versions 18 and later
Universal Windows 10 AppAndroidiPhone/iPadIOS Widget
// 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
nIndex is int
// Finds the customer row
nSubscript = LooperSearch(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 AppAndroidiPhone/iPadIOS Widget
// 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
nIndex is int
// Finds the customer row
nSubscript = LooperSearch(ATT_CustomerNum, Customer.CustomerNum)
IF nSubscript > 0 THEN
// Positions on the customer row
LooperPosition(LOOP_Customers, nSubscript)
END
END
Universal Windows 10 AppAndroidiPhone/iPadIOS Widget
// 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
nIndex is int
// Finds the customer row
nSubscript = LooperSearch(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 AppAndroidiPhone/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 Open.
You can get the value returned by a child window in the event "Closing a child window" of the window that opened it (the one that called OpenMobileWindow or OpenChild).
For example:
  • In the closing code of the child window, Close 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 AppAndroidiPhone/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 Open.
You can get the value returned by a child window in the event "Closing a child window" of the window that opened it (the one that called OpenMobileWindow or OpenChild).
For example:
  • In the closing code of the child window, Close 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 AppAndroidiPhone/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 Open.
You can get the value returned by a child window in the event "Closing a child window" of the window that opened it (the one that called OpenMobileWindow or OpenChild).
For example:
  • In the closing code of the child window, Close 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

Limitations

The ReturnedValue property applies to:
  • Universal Windows 10 AppAndroidAndroid Widget windows,
  • Universal Windows 10 AppAndroid options in Radio Button controls.
  • Versions 20 and later
    Universal Windows 10 AppiPhone/iPadIOS Widget reports.
    New in version 20
    Universal Windows 10 AppiPhone/iPadIOS Widget reports.
    Universal Windows 10 AppiPhone/iPadIOS Widget reports.
  • Versions 20 and later
    Universal Windows 10 AppiPhone/iPadIOS Widget internal reports (in read-only).
    New in version 20
    Universal Windows 10 AppiPhone/iPadIOS Widget internal reports (in read-only).
    Universal Windows 10 AppiPhone/iPadIOS Widget 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