How to set default value of a String column based on another column

cc11
Tera Contributor

Hi,

I have a custom table with two columns. Details & Summary.

I want to set first 255 Characters of Details column as default value to the Summary column.

I was wondering if I could do that from the 'Default value' property of Summary column.

Thank you,

Yogesh

1 ACCEPTED SOLUTION

Shishir Srivast
Mega Sage

you can try with subString() function JavaScript String substring() Method, example:



if (newValue.toString().length >= 255) {


      g_form.setValue('summary', newValue.substring(0,254));


}


View solution in original post

2 REPLIES 2

Shishir Srivast
Mega Sage

you can try with subString() function JavaScript String substring() Method, example:



if (newValue.toString().length >= 255) {


      g_form.setValue('summary', newValue.substring(0,254));


}


prasad48
Tera Guru

Try   dynamic default feature



Or Use   Onload Client script


var description= g_form.getValue("source field name");


g_form.setValue('summary', description.substring(0,254));