Testing for the existence of certain database entries
NOTE: The test should take place without taking access permissions into account.
Syntax
Session.Source().Exists("<Tablename>","<WhereClause>")
Example
Session.Source().Exists("Person", "CentralAccount = '" & accnt & "' and uid_person <> '" & uid_person & "'")
Related topics
Querying session object global variables
Global variables are allocated by the set up program. In addition to the predefined variables, all environment variable and custom variables defined on the session object can be used. Custom session variables can be defined, for example, using scripts, methods, or customizers.
NOTE: If you define a custom session variable, you must remove it again afterward. Otherwise it remains for the rest of the session and, in certain circumstances, the wrong processes can be generated.
Syntax
Variables("<Variable name>")
Example of use in process step parameters
Value = Variables("GENPROCID")
Value = CBool(Session.Variables("FULLSYNC"))
Table 133: Permitted predefined global variables
EnvUserName
|
Name of user to be authenticated in the environment, for example, Domain\User in Active Directory |
FullSync
|
The variable is set by all synchronizers. The values are True and False. |
GenProcID |
Unique Process ID number |
LogonUser |
DialogUser.Username of the currently logged in user. |
DialogUserUID |
DialogUser.UID_DialogUser of the logged in user. |
UserName |
Name displayed in XUserInserted or XUserUpdated. |
UserUID |
Logged in user’s UID_Person, if user related authentication is being used. |
ShowCommonData |
Specifies whether system data is shown (value = 1) or not shown (value = 0). The variable is evaluated in the Designer by the Show system data program setting. |
SessionType |
Specifies whether a direct database connection or a connection over an application server is supported.
Direct database connection only: '%SessionType%' = 'Direct'
Connect with the application server only: '%SessionType%' = 'AppServer' |
Feature_<Featurename> |
Queries additional program functions (DialogFeature) that are available for the user. The value is 1 when the program function is available, otherwise the variable is not set. |
ManageOutstandingOperation |
This variable is used to differentiate between running operations during post-processing of outstanding objects in target system synchronization. Permitted values are Delete, DeleteState, and Publish. |
Related topics
Using #LD-notation
#LD notation is used for displaying language-dependent information. #LD notation is mainly used in process tracking and processing notification, but it can also be used in scripts that are stored in the script library.
Syntax
Value=#LD[<language>|<language code>](<key>,{<Parameter>}*)#
where:
<language>|<language code> |
(Optional) Language or language variant for the output |
<Key> |
Basis string with place holder. The place holder syntax corresponds to a format place holder in VB.Net ({0} to {9}) |
<Parameter> |
Parameter for replacing the place holder (comma delimited) |
Table 134: Using #LD-notation
Process tracking |
Job.ProcessDisplay |
Mapped to DialogProcessStep.DisplayName |
JobChain.ProcessDisplay |
Mapped to DialogProcessChain.DisplayName |
JobEventgen.ProcessDisplay |
Mapped to DialogProcess.DisplayName |
Process handling notification |
Job.NotifyAddress |
|
Job.NotifyAddressSuccess |
|
Job.NotifyBody |
|
Job.NotifyBodySuccess |
|
Job.NotifySender |
|
Job.NotifySenderSuccess |
|
Job.NotifySubject |
|
Job.NotifySubjectSuccess |
|
JobRunParameter.ValueTemplate |
On in the MailComponent process component |
Templates
|
DialogColumn.Template |
|
DialogColumn.CustomTemplate |
|
Formats
|
DialogColumn.FormatScript |
|
DialogColumn.CustomFormatScript |
|
Task definitions |
DialogMethod.MethodScript |
|
Insert values
|
DialogObject.InsertValues |
|
DialogTable.InsertValues |
|
DialogTree.ListInsertValues |
|
DialogSheet.InsertValues |
|
Selection scripts
|
DialogTable.SelectScript |
|
DialogObject.SelectScript |
|
Process generating scripts |
Job.GenCondition |
|
Job.PreCode |
|
Job.ServerDetectScript |
|
JobChain.GenCondition |
|
JobChain.PreCode |
|
Related topics
Using #LD notation in process tracking
For language-dependent representation of process information, a relevant template must be defined to display the captions in the active languages.
The captions for language-dependent text are entered in DialogMultiLanguage when the script is compiled. A key (column Entrykey), the language and the translation (column EntryValue) are entered into the table. The key should be in the corresponding default language. If a language caption has not been entered, the key is used as the display text. Use the Language Editor to add translations for the captions in other languages.
Example:
A change is made to an employee. The language-dependent process information could be formulated as follows:
-
Value template for the process information on the Update event
Value = #LD("Change of properties of person {0}.", $InternalName$)#
-
Templates for the display texts in the DialogMultiLanguage table
Changed properties of employee {0}. |
English - United States [en-US] |
Changed properties of employee {0}. |
Changed properties of employee {0}. |
German - Germany [de-DE] |
Änderung der Daten der Person {0}. |
With InternalName = JBasset, the following display texts are produced in the process view.
English - United States [en-US] |
Change of properties of person JBasset. |
German - Germany [de-DE] |
Änderung der Daten der Person JBasset. |
Related topics