Changing the Behavious of Name field on SYS_USER table

User150433
Tera Guru

In SYS_USER table "name" field is a calculated field. As per our requirement we want to show name as Last Name, First name. So I changed calculation of this field in Dictionary. Now the name is shown as expected.

On caller field of Incident it works great. if I start typing with Last name it populates names. But If I try this on Assigned to field it does not work.

Any pointers on this??

Regards,
Amit

5 REPLIES 5

benn32
Kilo Contributor

What do you have valued in the "Reference Qual" attribute of the Assigned To field?


ptr1
Kilo Contributor

We have the LDAP names stored as Last, First.
The import then puts Last, in the first name field and First in the last name field.
I don't see this in the transform script or an LDAPUtil that does the parsing of the record. Where can I find it?


Not applicable

I had a similar problem, however it showed last_name, first_name but still searched on the users first name. We ran the following script in the scheduled jobs application and now I am able to search on last name.

var gr = new GlideRecord('sys_user');
gr.query();
while (gr.next()) {
gr.setWorkflow(false);
gr.autoSysFields(false);
gr.setForceUpdate(true);
gr.update();
}




I just wanted to add a comment to explain how calculated fields work.
Every time a record is queried (list view, form view, report) the calculated fields are re-calculated. However, the newly calculated value is not written back to the database until the record is saved.
So when you viewed the list of users everything looked fine, but when you search you are searching the original values.
The script Kris provided forces all user records to update and save the latest calculated values.