Create Validation on Item Level [message #614005] |
Wed, 14 May 2014 05:51 |
Xandot
Messages: 235 Registered: January 2014 Location: India
|
Senior Member |
|
|
Hello Experts,
I am going to create validation on item level and the validation are following:--
I have filed like "data size" and two other fields like "upper limit" and "lower limit" ,so my validation is when the data size are greater or lower than the data size than the error message should be popup.. My region type is HTML ..
so How can i do this ..
Please help me out ....
Thanks
|
|
|
|
Re: Create Validation on Item Level [message #614009 is a reply to message #614006] |
Wed, 14 May 2014 06:18 |
Xandot
Messages: 235 Registered: January 2014 Location: India
|
Senior Member |
|
|
Thanks for reply ...
Both the fields are number and there is no default upper and lower limit. it'll change according to the data type
like data type "string 20" and if it's size is 128 than the user only able to put the value within the range of 0 to 128 (max upper limit is 128 not greater than 128 and lower limit is 0 not less than that)..
There are so many types of data types are there its a list item of data type so when user is selecting particular data type into the list than the upper limit and lower limit set according to that ..
|
|
|
Re: Create Validation on Item Level [message #614011 is a reply to message #614009] |
Wed, 14 May 2014 06:26 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Are you talking about value's length? For example, if - as you said - its size is 128, you can't enter a string longer than 128 characters?
If so, then create a validation (a rather simple PL/SQL block), for example a function that returns Boolean, such as
return length(:PX_YOUR_ITEM) not between :PX_LOWER_LIMIT and :PX_UPPER_LIMIT;
Don't forget about the ultimate limit, represented by underlying table's column data type. If it is, for example,create table your_table (some_column varchar2(100)) no matter what you put into PX_UPPER_LIMIT item, you won't be able to store values longer than 100 characters into YOUR_TABLE.SOME_COLUMN.
|
|
|
|