Requirement – Input should be in specific format for one parameter. Let’s say we have one free text parameter (email) which must be ended with “@OLearning.com” .
It should not accept if email is not having @OLearning.com at end
How to Achieve -
Create one value set of validation type = Special
Press Edit Information and than Select event = Validate
Write validation logic in Function section
FND PLSQL "DECLARE
lv_str varchar2(100) := :!VALUE;
lv_com varchar2(20);
lv_standard varchar2(100) :='@OLearning.com';
BEGIN
IF (lv_str IS NOT NULL) THEN
Select substr(lv_str,instr(lv_str,'@'
lv_str varchar2(100) := :!VALUE;
lv_com varchar2(20);
lv_standard varchar2(100) :='@OLearning.com';
BEGIN
IF (lv_str IS NOT NULL) THEN
Select substr(lv_str,instr(lv_str,'@'
lv_com from dual;
IF lv_com<>lv_standard THEN
fnd_message. set_name('XXXXX','@OLearning is Required');
fnd_message.raise_error;
END IF;
END IF;
END;"
fnd_message.
fnd_message.raise_error;
END IF;
END IF;
END;"
Go to concurrent program definition page
Press parameter button
Create parameter for email address and associate above created value set (OLearning_VS)
Save the program
Validation –
Go to respective responsibility
Run the concurrent program
Pass the email parameter = sandeep@gmail.com and tab out
Pass the email parameter = sandeep@OLearning.com and tab out
Thanks. I used this solution for my requirement.
ReplyDelete