LinkList_GetID(ModulCode As String) As Integer

 

Returns the ID of the first selected record in WindowLink.

 

If the ModulCode corresponds to the active modul in the FROM DATABOX list and a record is selected, then its ID is returned.

Otherwise the FROM LINKBOX list is evaluated and if the ModulCode matches the active modul then the ID of the first selected record is returned. ModulCode is not case sensitive.

 

If no modul matches or no record is selected, then a value of -1 is returned.

 

 

 

Parameters:

 

Name

Type

Value

Description

ModulCode

String

ADR

ADDRESS

ADDRESSES

Retrieve ID of first selected address record in upper listbox ("FROM DATABOX" in WindowLink. If not available, then retrieve ID of first selected address record in lower listbox ("FROM LINKBOX").

ModulCode

String

EVT

EVENT

EVENTS

Retrieve ID of first selected event record in upper listbox ("FROM DATABOX" in WindowLink. If not available, then retrieve ID of first selected event record in lower listbox ("FROM LINKBOX").

ModulCode

String

INF

INFO

INFOS

Retrieve ID of first selected info record in upper listbox ("FROM DATABOX" in WindowLink. If not available, then retrieve ID of first selected info record in lower listbox ("FROM LINKBOX").

ModulCode

String

ITM

ITEM

ITEMS

Retrieve ID of first selected item record in upper listbox ("FROM DATABOX" in WindowLink. If not available, then retrieve ID of first selected item record in lower listbox ("FROM LINKBOX").

ModulCode

String

FIN

FINANCE

FINANCES

Retrieve ID of first selected finance record in upper listbox ("FROM DATABOX" in WindowLink. If not available, then retrieve ID of first selected finance record in lower listbox ("FROM LINKBOX").

ModulCode

String

LOC

LOCATION

LOCATIONS

Retrieve ID of first selected location record in upper listbox ("FROM DATABOX" in WindowLink. If not available, then retrieve ID of first selected location record in lower listbox ("FROM LINKBOX").

Hint: You can use either one of the 3 forms of a parameter. The parameter is not case sensitive

 

Returns:

 

Type

Value

Description

Integer

0 - n

Record ID of first selected record

 

- 1

No matching record was found or no record was selected

 

Available in:

 

WindowMain

WindowLink

NO

YES

 

 Used in:

 

XojoScript Name

GUID

Load seminar prices to registration

1E3DB33D-DC46-46BB-8483-C15DBDF3A423

Calculate total participation fee for current attendee

F0F802CC-D151-4F59-A749-1E232527D0C2

Calculate seminar participation fee

2F6CFC74-44AB-4956-A760-BBD5E57595E8

Edit Registration

89F9973D-C3A4-4466-BAE7-8AE85115AE09

Create Seminar Invoice in Word

D2036EFA-D283-481A-9A93-D00547680749

Calculate participation fee for seminar attendee

032B50D3-D463-453E-9370-9AF7C34DA1D5

 

Hint: You can find more references to XojoScripts which make use of this function by sending the following SQL statement to the database:

Select id,GUID, ScriptName,ScriptCode from im_scripts where ScriptCode Like '%LinkList_GetID%'

 

Example XojoScript:

 

Dim lb As String = "imLB_lnk_p01_ItemsOrdered"

 

If ListCount(lb) = 0 Then

 

// Retrieve contents of pricecode list of selected event

Dim priceCodes As String = GetText("imLB_evt_List3",LinkList_GetID("evt"))

If priceCodes = "" Then Return

 

// Retrieve the language code of selected address

Dim lang As String

lang = Trim(Uppercase(GetText("imCO_adr_Language", LinkList_GetID("adr"))))

 

// If language is not set on address, try to determine country

If Len(lang) = 0 Then

lang = Uppercase(GetText("imCO_adr_Country", LinkList_GetID("adr")))

If Len(lang) > 1 Then lang = Left(lang,1)

End If

 

// Set language to English if we get anything else than German or French

Select Case lang

Case "D", "E", "F"

Case "A"

lang = "D"

Else

lang = "E"

End

 

End If