Field type 'Date/Time' not to show "(empty)" in list view

Community Alums
Not applicable

find_real_file.png

This field type is a 'date/time'. When there is no value on that field, it shows '(empty)' on list view. Looks like it is coming only on list view and not on the form view. how can I remove this word?

2 REPLIES 2

venkatiyer1
Giga Guru

Hi Rajini,



As far as i know there is no straightforward property or code change to remove that empty value from the list unless we do some dom manipulation which would be expensive on a list. I would wait to see if somebody has a better idea but here is my proposal if you want to have an empty value. You would need to make two changes to get it done.



1. First make the field stype of the date field as display none.


So configure field style on date field. Choose the table, field name i.e. the date field and leave the value empty.


In Style add display: none (there is no quotes or double quotes around none)



2. The first step above will hide the (empty) label in list view and if value is present it will show up. But here is the catch since we added display none the field would be hidden on form as well.



So you would need an onload client script and then use the following script



function onLoad() {


    //Type appropriate comment here, and begin script below


// g_form.setVisible("u_planned_date", true);


$("tablename.fieldname").setStyle({display: ''}); // replace the table name and field name accordingly


}



Doing the two steps above would achieve the result with very less dom manipulation.


Community Alums
Not applicable

Thanks Venkat. I will try the above steps and update you soon..