Home | Sign in | English EN
  • Location of gLink
  • Added value
  • Sensitivity to the case
  • Auto-filled combo boxes
  • Retrieved element
  • Scheduler control
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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.
  • 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: In this case, the control will directly return the value of gLink corresponding to the selected option.
// 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
// Displays "1" in our example.
<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.

Location of gLink

gLink can be called anywhere in the row to add.
For example:
ListAdd(COMBO_COMBO1, gLink("1") + "Mister")
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 case sensitive (uppercase/lowercase characters).
Therefore, the following code:
ListAdd(LIST_LIST1, "MyElement" + gLink("AAA"))
will be equivalent to:
ListAdd(LIST_LIST1, "MyElement" + gLink("aaa"))

Auto-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.
// 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.MeetingID))
// Click code on BTN_NEW_APT button
MyAPT is Appointment
IF SCH_RoomOccupancy..SelectedResource = "" THEN
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
Component : wd260obj.dll
Minimum version required
  • Version 9
This page is also available for…
Click [Add] to post a comment