Home » Developer & Programmer » Forms » what is format mask value for financial year for ex: 2015-16 (oracle d2k6i)
what is format mask value for financial year for ex: 2015-16 [message #637870] Thu, 28 May 2015 02:22 Go to next message
jgjeetu
Messages: 373
Registered: July 2013
Location: www.Orafaq.com/Forum
Senior Member

I want to apply format mask for a text_item column . the column name is financial year.
My requirement is it should accept value only in 'YYYY-MM' Format i.e 2014-15.

Please tell me what value should i pass in format mask property.
Re: what is format mask value for financial year for ex: 2015-16 [message #637871 is a reply to message #637870] Thu, 28 May 2015 02:37 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
I don't believe there is one.
You'll have to use a when-validate-item trigger.
Re: what is format mask value for financial year for ex: 2015-16 [message #637877 is a reply to message #637871] Thu, 28 May 2015 03:22 Go to previous messageGo to next message
jgjeetu
Messages: 373
Registered: July 2013
Location: www.Orafaq.com/Forum
Senior Member

@cm right now i am using when_validate_trigger i.e

IF LENGTH(:GENERATE.FIN_YEAR)<>7
	--and SUBSTR(:GENERATE.FIN_YEAR,5,1)<>'-'
	THEN
	MESSAGE ('Enter Financial Year in YYYY-MM Format');
	MESSAGE('Enter Financial Year in YYYY-MM Format');
	RAISE FORM_TRIGGER_FAILURE;
END IF;

IF SUBSTR(:GENERATE.FIN_YEAR,5,1)<>'-'
	THEN
	MESSAGE ('Enter Financial Year in YYYY-MM Format');
	MESSAGE('Enter Financial Year in YYYY-MM Format');
	RAISE FORM_TRIGGER_FAILURE;
	END IF;


but if i combine both conditions i.e

IF LENGTH(:GENERATE.FIN_YEAR)<>7
	and SUBSTR(:GENERATE.FIN_YEAR,5,1)<>'-'
	THEN
	MESSAGE ('Enter Financial Year in YYYY-MM Format');
	MESSAGE('Enter Financial Year in YYYY-MM Format');
	RAISE FORM_TRIGGER_FAILURE;
END IF;


it just validates length and bypasses 2nd condition. that is why i wanted to use format masking.
Re: what is format mask value for financial year for ex: 2015-16 [message #637878 is a reply to message #637877] Thu, 28 May 2015 04:00 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
You want it to show the message if either condition is true.
You've written it so that both need to be true.
Re: what is format mask value for financial year for ex: 2015-16 [message #637893 is a reply to message #637878] Thu, 28 May 2015 06:10 Go to previous message
jgjeetu
Messages: 373
Registered: July 2013
Location: www.Orafaq.com/Forum
Senior Member

omg ,thanks yeah got it Laughing
Previous Topic: Master Detail Relation
Next Topic: Make a form searchable at the line level
Goto Forum:
  


Current Time: Thu Mar 28 12:29:39 CDT 2024