Documentation Index

Fetch the complete documentation index at: https://help.idibilling.com/llms.txt

Use this file to discover all available pages before exploring further.

IDI version 26.8 is now available.  Click here for details: IDI Updates.

Validation tab

Prev Next

The Validation tab is used when the you need a more complex Attribute field. For example, you want a drop-down list that is not to be included in any of the standard IDI database tables. It could require a static list, meaning the list does not appear in any table but is taken directly from this Domain Source code for this Attribute Type.

Domain Type

The Domain Type field specifies the kind of values to be used in the attribute. The valid Domain Types displayed in the drop-down list:

  • Nothing - This Domain Type does not perform any validation. No source code is required for this attribute. This is the default Domain Type.

  • DBQuery - The DBQuery Domain Type lets you write an SQL query against the Core database to be used with this attribute. Selecting this type enables the Domain Query Results link.

    Use the format 'SELECT [value,caption] FROM…

    Example:

    Select distanceid,name

    from DistanceType

    where distanceid>25

  • InfoScript - The InfoScript Domain Type Lets you to write source code using IDI's Infoscript language.

    You can enter about 10 lines of code using InfoScript.

    Example:

    if(value < 0 or value > 10)

    return "The value must be between 0 and 10'

    end

    The previous InfoScript means: If the script returns a value, then we assume the return value is an error message. The variable 'value' contains the value of the type at validation time.

  • StaticList - Selecting the StaticList Domain Type lets you to enter a list of values that you do not want to add to the database. This list is displayed as a drop-down list in the IDI Desktop Client GUI.

    The format to be used is [arg1, arg2, arg3]

    Example:

    ['None','Abe Fuchs','AnnMarie Retas','Barry Schafer','Gerard Jones','Heather Wiese','Larry Rappaport']

  • DBQueryPlus - The DBQueryPlus Domain Type lets you query against databases other than Core. The syntax is:

    Target;Alias;Query

    OR

    Target;Query for default alias

    Selecting this type enables the Domain Query Results link.

Domain Source

The Domain Source is the area where you write the source code describing the limits of the Domain Type. This is required for a static list, an SQL query, an SQL QueryPluse and InfoScript code.

The Domain Type field specifies the kind of values to be used in the attribute. The valid Domain Types displayed in the drop-down list:

  • Nothing - This Domain Type does not perform any validation. No source code is required for this attribute. This is the default Domain Type.

  • DBQuery - The DBQuery Domain Type lets you write an SQL query against the Core database to be used with this attribute. Selecting this type enables the Domain Query Results link.

    Use the format 'SELECT [value,caption] FROM…

    Example:

    Select distanceid,name

    from DistanceType

    where distanceid>25

  • InfoScript - The InfoScript Domain Type Lets you to write source code using IDI's Infoscript language.

    You can enter about 10 lines of code using InfoScript.

    Example:

    if(value < 0 or value > 10)

    return "The value must be between 0 and 10'

    end

    The previous InfoScript means: If the script returns a value, then we assume the return value is an error message. The variable 'value' contains the value of the type at validation time.

  • StaticList - Selecting the StaticList Domain Type lets you to enter a list of values that you do not want to add to the database. This list is displayed as a drop-down list in the IDI Desktop Client GUI.

    The format to be used is [arg1, arg2, arg3]

    Example:

    ['None','Abe Fuchs','AnnMarie Retas','Barry Schafer','Gerard Jones','Heather Wiese','Larry Rappaport']

  • DBQueryPlus - The DBQueryPlus Domain Type lets you query against databases other than Core. The syntax is:

    Target;Alias;Query

    OR

    Target;Query for default alias

    Selecting this type enables the Domain Query Results link.

Domain Query Results

The Domain Query Results link opens the Domain Source Values window. (Show picture)

DomainSourceValues

This link is available if selected a Domain Type of DBQuery or DBQueryPlus is selected.

The Domain Source Values window lists the data returned by the query:

Value - The data retrieved by the query.

Caption - The name given to the value.

Do Not Cache

The Do Not Cache check box determines whether attribute will be cached with other attribute data or not. If checked the data is fetched and re-evaluated every time the attribute is used.

This is a read-only field. This check box is set only when importing attributes through an .xml file. Generally, this is used for reports.

If the query is not valid, a red icon icoRedBallExclaim is displayed over the Data Source area when you click Save or Apply. If you hover over the icon, an error message is displayed.