Przejdź do głównej zawartości

IsValidFieldValue

Checks if value in the field is valid or given value can be assigned to given case field.

IsValidFieldValue("fieldName",["fieldValue"]);
  • fieldName – (String) The name of the field to be tested
  • fieldValue – (String) [Optional] The test value for the field

This function returns Boolean. Returns true if specified value can be assigned to specified field, otherwise false.

Example 1: Check if value in field Customers is valid value for this kind of field.

isValid = IsValidFieldValue("Customers");

Example 2: This will check if ’Datacom’ string is appropriate value for ’Customers’ field and store return value in ’isValid’ variable.

isValid = IsValidFieldValue("Customers", "Datacom");

Example 3: This will check if ’ABC’ is appropriate value for ’Amount’ field and if true, do something.

if(isValidFieldValue("Amount","ABC")){
//do something
}