07-02-2012 11:22 AM
Hi all,
I have created a custom database having a field score. I want this field to have values from 0 to 10 with two decimal places. When I created a domain with type decimal, I am not able to enter the value 10. Can anyone help me with this issue o suggest an appropriate data type?
07-05-2012 12:24 PM
Hi,
If you are creating a table maintanence for your table, you can restrict the value by writing the code in EVENTS. You can check whether the values is in range 0 to 10,
Cheers
~Niranjan
07-02-2012 2:26 PM
Hi,
Create a data element of type DEC with length 5 decimal places 2. It should work.
Regards.
07-02-2012 2:35 PM
Hi Sooraj,
Your issue can be resolved by above post by Fournier. Data type, Length, number of decimal places,output length, letter case, Value range and value table can be set in Domain.
Close this thread if your question is answered.
Thanks,
Prem
07-05-2012 12:18 PM
Thanks for the reply.....
Even after giving the value range from 0 to 10, I am able to make entry with a value greater than 10. How to solve this issue?
I gave decimal places 2 and length 5...still no use.....
07-05-2012 12:45 PM
Create a domain with type dec length 5 decimals 2 and in the values tab, add a range from 1 to 10.
Then change your data element to use the newly created domain.
07-05-2012 12:24 PM
Hi,
If you are creating a table maintanence for your table, you can restrict the value by writing the code in EVENTS. You can check whether the values is in range 0 to 10,
Cheers
~Niranjan
07-05-2012 12:40 PM
Hi,
Give interval values as upper limit as 10 and lower limit as 0 in value ranges.
regards.
07-06-2012 10:49 AM
Hi Laurent/Lingaraj,
I have done the same thing you guys told.....Created a domain with dec type length 5 decimal places 2. In the interval lower limit 0 and upper limit 10. Still I can make an entry > 10.
Niranjan: Is there any other way, without going for TMG?
07-06-2012 10:55 AM
Hi again,
The value limit documentation describes :
"
There is only an input check of the mask for data types CHAR and NUMC. Note that the system only checks single values for NUMC.
if a check table and fixed values are defined for a table field, only values that exist in both the check table and in the fixed values can be entered in the field."
So in your case, you must check the value from your program.
Regards.
07-06-2012 10:59 AM
An open-sql insert statement will not care for any kind of restriction put on field (foreign key) or domain (value) as long as the value is complient with the internal type definition (num/dec/bin packed/binary, ect.)
- You can have a range [0,9;99] or [-9.99,9.99] but not [0,10] without coding in every program involved.
- The dialog maintenance generator will add some check, but those check must be coded in each of your programs that maintain this field value.
- If this data comes from user input on screen, you could use a conversion-exit to clear invalid values.
- Which kind/number of programs will maintain this value ?
Regards,
Raymond
07-06-2012 11:01 AM
07-06-2012 11:40 AM
Hi all,
There is a filed in my table which is of type RWASTRING.
Because of that I cannot create TMG for this table as i am getting a short dumb whenever I create a TMG.
Now what to do with the above problem we discussed??
07-06-2012 1:03 PM
07-07-2012 6:06 AM
Venkat,
Getting an error 'Fixed value definition is not allowed for this data type'...