My Oracle Support Banner

HOW TO PERFORM PATTERN CHECK USING SCRIPT (Doc ID 2435353.1)

Last updated on NOVEMBER 09, 2019

Applies to:

Oracle Fusion Sales Cloud Service - Version 11.12.1.0.0 and later
Information in this document applies to any platform.

Symptoms

We are trying to identify the repeating digits within a number. To evaluate the same, we have written a Regular Expression and used the same in the expression area for the Formula Fields.

However when we try to trigger the code while creating a record, the if condition code is not evaluated and the function always returns valid


We are trying to use the following expression in our logic:
def Phone = PhoneNumber_c
def regexstr = /([0-9]{5})?/
if (Phone!=null && Phone.replaceAll(' ','').matches(regexstr))
{
'invalid'
}
'valid'


We get the following Issue:
The expression doesn’t enter the if condition even if the data matches

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.