Key_commit personalization [message #606227] |
Tue, 21 January 2014 05:31 |
|
vik@s
Messages: 10 Registered: January 2014 Location: India
|
Junior Member |
|
|
In the order Managements super user the
customer additional information forms insert the vat number .
the vat no should 12 digit and last digit must be v or V.
|
|
|
Re: Key_commit personalization [message #606239 is a reply to message #606227] |
Tue, 21 January 2014 07:31 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Regular expression might do the job. Have a look at this example, which - among several values - query returns valid VAT numbers.
SQL> WITH test AS (SELECT '123456123456v' vat FROM DUAL
2 UNION
3 SELECT '012987654321V' FROM DUAL
4 UNION
5 SELECT '1234v' FROM DUAL
6 UNION
7 SELECT 'vvv123v' FROM DUAL
8 UNION
9 SELECT '123abc456defv' FROM DUAL
10 UNION
11 SELECT 'abc123v' FROM DUAL)
12 SELECT vat
13 FROM test
14 WHERE REGEXP_LIKE (vat, '\d+{12}v|V');
VAT
-------------
012987654321V
123456123456v
SQL>
EDIT: I'm not sure what you meant by saying "12 digit" - is it, actually, "12 characters, where 11 of them are digits and the last one is v or V" or "12 digits plus v or V". Number of digits is specified between curly brackets (here: {12}) so - modify it if necessary.
[Updated on: Tue, 21 January 2014 07:33] Report message to a moderator
|
|
|
|
Re: Key_commit personalization [message #606329 is a reply to message #606328] |
Wed, 22 January 2014 07:09 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
I'm sorry, but I'm having difficulties in understanding what you are saying.
I don't use EBS so "personalization" is something I'm not familiar with. However, in pure Forms, that task would be left to a WHEN-VALIDATE-ITEM trigger: if value entered satisfies the REGEXP_LIKE condition, fine - stay quiet. If not, raise an error.
|
|
|