_IsValueGreaterThanOrEqualToArray (PFDateTime, Array)

Checks if a date time value is greater than or equal to all of the date times in an array.

Syntax

_IsValueGreaterThanOrEqualToArray(valueToTest,valueList)

Parameters

Parameter Definition Data type
valueToTest Date time value with which to compare the values in the array. PFDateTime
valueList Array of date time values against which to compare the value specified in the valueToTest parameter. Array of PFDateTime values

Returns

True or False (Boolean), indicating whether the date time to test is greater than or equal to all of the date times in the array.

Note:

  • The valueToTest value is compared to each element of the array. If the value is greater than or equal to every element of the array, the method returns True. If at least one element is less than the value, the method returns False.
  • All comparisons are done using the _CompareDates method and are normalized. For more information, see Date time processing.

Example

This example checks whether the date of termination is greater than or equal to all visit dates for the patient and issues a query if the date of termination is less than any of the patient visit dates. The rule is created at the item level and uses the mapping “RulesLS” and the data set and series within that mapping. All of the visit dates in a data series called VisitDates within the RulesLS mapping.

evaluate on Form Submission
    value = _IsValueGreaterThanOrEqualToArray(this.Value, RulesLS.DateCollection.VisitDates.Values)
when value is false
    issue query: Termination date must be later than any visit date.