PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Location of gLink
  • Added value
  • Sensitivity to the case
  • Self-filled combo boxes
  • Retrieved element
  • Scheduler control
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
Adds an "invisible" value into an element found in a List Box, Combo Box or Scheduler control. This value will be the stored value when the control element is selected by the user.
Notes:
  • To find out the stored value associated with a control element, use ..StoredValue.
  • In order for the retrieval of the value defined by gLink to be enabled:
    • use gLinkActivate.
    • WINDEVAndroidAndroid Widget Windows MobileJava check "Returns the value specified by gLink" ("Details" tab of control description).
    In this case, the control will directly return the value of gLink corresponding to the selected option.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 16 and later
PHP This function is now available for the PHP sites.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 16
PHP This function is now available for the PHP sites.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
PHP This function is now available for the PHP sites.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Android Widget This function is now available in Android Widget mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Code of button used to fill the combo box
// ----------------------------------------------
// The "COMBO_Title" combo box displays the genders:
// "Mister", "Madam" and "Miss".
// An integer representing a gender will be returned to the language.
ListAdd(COMBO_Title, "Mister" + gLink("1"))
// Only the string "1" is returned to the language.
// This returned character string is not displayed in the combo box.
// Code of button used to find out the value of gLink
// -----------------------------------------------------------
// Code used to get the value of gLink for the selected option
Info(COMBO_Title[COMBO_Title]..StoredValue)
// Displays "1" in our example.
Syntax
<Result> = gLink(<String to Return>)
<Result>: Character string
Control string that must be used in ListAdd, ListInsert or ListModify.
<String to Return>: Character string (with quotes)
Text value to return. Only this string will be returned to the language. This string will not be displayed in the row.
Remarks

Location of gLink

gLink can be called anywhere in the row to add.
For example:
ListAdd(COMBO_COMBO1, gLink("1") + "Mister")
OR
ListAdd(COMBO_COMBO1, "Mister" + gLink("1"))

Added value

When a value is added by gLink, this value is ignored by the sort and by the shortcuts.
If several values are added into an element of a list box by gLink, only the first value will be returned.
ListAdd(LIST_LIST1, "MyElement" + gLink("Link1") + gLink("Link2"))
In this example, only the "Link1" value will be returned.
ListSeek takes into account the values added by gLink.

Sensitivity to the case

gLink is not sensitive to the case (uppercase/lowercase characters).
Therefore, the following code:
ListAdd(LIST_LIST1, "MyElement" + gLink("AAA"))
will be equivalent to:
ListAdd(LIST_LIST1, "MyElement" + gLink("aaa"))

Self-filled combo boxes

gLink is used to manage the "auto-filled combo box" controls.

Retrieved element

When an element is retrieved from a List Box or Combo Box control, the priority order is as follows:
  1. Values added by gLink.
  2. Values added by gARetrieve.
To find out the stored value associated with a control element, use ..StoredValue.

Scheduler control

If the resources of the schedule have been created by SchedulerAddResource by using gLink, the name of the resource returned by ..SelectedResource for example will correspond to the value specified in gLink, for this resource.
Example:
// Adds a resource (a meeting room) into the Scheduler control
// Meeting is the data file that describes the available meeting rooms
SchedulerAddResource(SCH_RoomOccupancy, Meeting.Name + gLink(Meeting.IDMeeting))

...

// Click code on BTN_NEW_APT button
MyAPT is Appointment
IF SCH_RoomOccupancy..SelectedResource = "" THEN
       RETURN
END

MyAPT..StartDate = SCH_RoomOccupancy..StartDate
MyAPT..EndDate = SCH_RoomOccupancy..EndDate
MyAPT..Resource = SCH_RoomOccupancy..SelectedResource
// The name of the resource corresponds to the value specified
// in gLink for this resource
Components
WINDEVReports and Queries wd230obj.dll
WEBDEV - Server code wd230page.dll
Windows Mobile wp230obj.dll
Java wd230java.jar
Linux wd230obj.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment