QPR Knowledge Base 2017.1

RemoveValidationWarnings

RemoveValidationWarnings

Previous topic Next topic No directory for this topic  

RemoveValidationWarnings

Previous topic Next topic Topic directory requires JavaScript Mail us feedback on this topic!  

Revision history:

Introduced in QPR 2012.2

 

Removes all validation warnings added by the AddValidationWarning function from the given element.

 

Synopsis:

 

PGModel.RemoveValidationWarnings(Element)

 

Parameters:

 

Element: Integer/String. Either an Element ID (integer) or Symbol of the Element (String). If this parameter is 0 or an empty string, the warning will be added to the element that is currently being validated.

 

The validation script can contain the following tags that will be replaced with the transaction specific values when the script is run:

<#ElementId>: id of the element that is being validated

<#ElementTypeId>: element type id of the element that is being validated

<#TransactionId>: transaction id, unique inside the client session

<#NewCount>: number of new elements in the transaction

<#ModifiedCount>: number of modified elements in the transaction

<#NewElement>: True if current element is a new element, False otherwise

<#ModifiedElement>: True if current element is a modified element, False otherwise

<#NewIndex>: if current element is a new element, index of the element in the transaction (-1 if current element is a modified element)

<#ModifiedIndex>: if current element is a modified element, index of the element in the transaction (-1 if current element is a new element)

<#TotalIndex>: total index of current element in the transaction

 

Required Rights:

 

None.

 

Return Values:

Below are listed the return values that this function can return:

 

RV_APPLICATION_QUIT_CALLED

RV_MODEL_NOT_OPEN

RV_ELEMENT_NOT_FOUND

 

Example Procedure:

 

Sub main()

 Dim iResult, iElementId

 iElementId = <#ElementId>

 iResult = PGModel.RemoveValidationWarning(iElementId)

End Sub