date
Formula operator | Date and Time | Text | General Mathematics | Conversion and Formatting | Extras | XIH Helper Functions |
---|
TIS Table Info
Getting started | The name of TIS tables in the database is normally not the same as in TIS table directory. To get the database name you have to use the XIH function. |
Preparation | Create a data node without reference to another node. Add the operation "Create Table" with one column and one row. Header and input for this table are temporary and don't influence the operation itself. |
Formula Operator | Add an operation to the node and choose formula operator with an Text as result column type. XIH.TISTable("string TISTablePath", "string TISTableName") |
Result | The path an Name of the table. |
Additional possibilities | You can also get the information for one or more TIS tables
|
Using Resources to switch between different languages
Getting started | TIS supports switching between languages, and many things are directly accomplshed |
This helps to set the user language in a parameter (only if it changes) Typically resources are defined with just two characters, but you may want to distinguish de-de, de-at .... | ( |
Example | XIH.GetResourceText("Warning_Date_als_Zahl", "de") XIH.GetResourceText("Warning_Date_als_Zahl", ((string)XIH.GetParam("USER_LANGUAGE_SHORT"))) |
Additional Tipp | The operator Read TIS resources gives you a full list. |
Generating Passwords
Getting started | XIH allows generating random passwords with given parameters, such as length, necessary characters. |
Function | string XIH.Password(int length) string XIH.Password(int seed, string alphabet, int length) string XIH.Password(int seed, int length) string XIH.Password(int seed, string alphabet, int length) length (int): length of the password alphabet (string): characters that should be included in the password (eg: 123, abc, ABC, !"§, …) seed (int): number that defines which password should be generated |
Encryption and Decryption
Getting started | This function encrypts a text string. The result can be decrypted later again. |
Function | string XIH.Encrypt(string text) string XIH.Decrypt(string encryptedText) |
Getting database info
Getting started | This XIH functions informs you, which database (Oracle, MSSQL, POSTGRES) is actually used by the system which again |
Function |
|
Check Email Address
Getting started | This XIH functions checks whether an email address is formally correct. |
Function | bool XIH.IsValidEmail(string emailAddress) |
User Name of Account User
Getting started | If a higher number of users get access to the [TIS]Board Account Users are generated. The normally get activated only if they are logged in to the [TIS]Board. If you need to find out the account user for a calculation this XIH function is essential. |
Function | string XIH.AccountId() |
Syntax | Note that you must omit the brackets in the Formula operator (row-by-row) (4.0) = Formeloperator: XIH.AccountId |
Result | null or "" if it is a normal user and not a Pool user |
Single-Sign-On Parameter
Getting started | In context of a single sign on (SSO) a list of parameter, value tuples are transferred. Note that you must define a Logon-Event on the TIS-Board, which recalculates a data node using this function. Later the parameters are not available anymore. See also Event Handling with Portlets. |
Function | string XIH.GetLogOnParam(string name, string default_value) |
Example | XIH.GetLogOnParam("t", "-") führt zu transparenter Eintrag falls User in Liste der bekannten User ist zu encrypted wenn Pool-User |
XIH functions
Please note: XIH functions do NOT allow # in the notation of variables. Example: write "Identifier" instead of "#Identifier#".
See also XIH Functions
Examples
Snippets
Access table for programmers
Type | Description |
---|---|
XimesData.GenTable | Object Table |
XimesData.GenRow2 | Object Table row |
XimesData.ColumnType | Object Table column |
Function/Property | Resulting value | Description |
---|---|---|
dataRow.Parent | XimesData.GenTable | Returns the row of the current table. |
dataRow.Parent[i] | XimesData.GenRow2 | Returns the i-th row of the current table. The first row has index 0. |
dataRow.Parent[i][j] | object | Returns the value of column j in row i. Indices of rows and columns always start with 0. Since the values are always of the type object, they need to be converted to the right type for further processing. System.Convert.ToDouble(dataRow.Parent[0][3]) |
dataRow.Parent.CountCols | Number | Returns the number (quantity) of the columns, including newly created columns. |