Reference field showing sys_id

ceraulo
Mega Guru

Hi!

I have a custom form called u_ctable1 which contains 3 fields: field_1, field_2, field_3. All fields are string fields. field_3 is a function string field that concatenates field_1 and field_2.

I have another custom form called u_ctable2 that has a reference field , referencing u_ctable1.  It is correctly displaying the field_1 value. What I want to do is to display 'field_3'.

How to do this?

Thanks!

1 ACCEPTED SOLUTION

ceraulo
Mega Guru

I have fixed this issue. A function field cannot be used as a display field.

I then created a BR that concatenates both fields and saves it to a new string field. I also set this new string field as the display value.

View solution in original post

10 REPLIES 10

I've tried this earlier but I'm getting this error when I open a record from ctable2.

find_real_file.png

ceraulo
Mega Guru

I have fixed this issue. A function field cannot be used as a display field.

I then created a BR that concatenates both fields and saves it to a new string field. I also set this new string field as the display value.

Ah okay. Got it.

So used my suggestion and then marked your own answer correct. Lol, cheers buddy.

Hi David,

I already tried your and asifnoor's suggestion before I posted my question. It wasn't working. What fixed my issue were the following:

1. Deleting the function string field (field_3)
2. Create a string field
3. Create a BR that concatenates the 2 fields and saves it to the third field
4. Setting this third field as the display field

I also specifically mentioned that function string fields cannot be used as a display field. Function field was introduced only in Kingston.

https://docs.servicenow.com/bundle/kingston-application-development/page/build/platform-functions/concept/platform-support-functions.html