ObjectGears Help

           
Forum   ObjectGears (Version: 1.6.0.0)

Rules

Mandatory column fulfilment based on value in another column - Rule Condition

This example checks, if there is set value in column Real resolution time, when saving a record in the class Incident with status Closed.

Rule type: Before existing record save - Condition

Condition:

(column('status') == 3) && (IsNull(column('real-resolution'),'default') == 'default')

Error message: When closing the an incident it is necessary to set the column 'Real resolution time'.

 

Mandatory column fulfilment based on value in another column - Rule Script

This example checks, if the column 'display_to_users' is checked at the time of record saving. If it is checked and columns 'affected_services' and 'description' are not filled in, it will return a localised message 'work_schedule_display_to_users'.

Typ pravidla: Před uložením nového záznamu - Skript

Typ pravidla: Před uložením existujícího záznamu - Skript

//If column 'display_to_users' is Yes, columns 'affected_services' and 'description' cannot be Null.
if (OGActualDataRow['display_to_users'])
{
    var afse = OGActualDataRow['affected_services'];
    var desc = OGActualDataRow['description'] ;
    if ( afse == '' || afse == null || desc == ''  || desc == null)
    {
        OGActualMessage.SetError( OG.MessageLoc.GetText(2, 'work_schedule_display_to_users'));
        return true;
    }
}

 

This website is using cookies files to provide services and analyse visits. You agree with that by using this website.     Further information