cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Restrict the value of a classification attribute to 2 decimal places.

Former Member
0 Kudos
352

Hi Team,

I have a situation wherein I need to restrict the classification attribute value to 2 decimal places at the time of saving. Is there a way we can achieve this. I have looked into the option of Interceptors and dynamic constraints but unable to proceed with them. Any pointers would be highly appreciated.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi I am interested in the restricting the classification attribute and not a normal product attribute. Thanks.

arvind-kumar_avinash
Active Contributor
0 Kudos

Why do you want it to restrict at the database level? Can not you manage displaying it with 2 decimal places on the UI?

If you still want to do it at database level, you can try a direct SQL command in the database; something like

 ALTER TABLE YourTableNameHere MODIFY COLUMN YourColumnNameHere decimal(4,2)

Note: I never support executing DDL (Data Definition Language of SQL) commands in Hybris and you should try it first in local system and test the application properly before you try in any shared environment.