Overriding max length for short_description field on demand table?

tarungupta1017
Kilo Contributor

Hi,

How can I override the max length on short_description field on dmn_demand table? I would like to restrict the length of short_description on demand table at 60 characters.

The max_length is set as 160 in dictionary and I don't want to set it to 60 at task level as it will lead to loss of data. I just want to set the max_length of 60 only on dmn_demand and not affect the task table.

I have tried overriding the attributes and have added 'max_length=60' as the attribute in the Dictionary Override record but it is not working.

Any help will be highly appreciated.

3 REPLIES 3

vinothkumar
Tera Guru

You can also create an onChange client script onchange of short description field and provide an alert message if the length exceeeds 60 char 

Yes, that is one way. Can you think of any other way?

Christian Engs2
Giga Contributor

Hi,

 

I used an Onload client script 

 

function onLoad() {
setTimeout(function() {
jQuery('input[name="problem.short_description"').attr("maxlength","100");
}, 1000);
}

 

find_real_file.png