- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2020 09:09 AM
Hi all,
I have a function field that I am trying to concat three separate fields together with "-" in between each. All of these fields are reference fields. I have done it in the past but I can not remember how to write the function so the concat is the display value instead of the sys_id's concat.
Here is my function:
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2020 11:06 AM
FYI for anyone with the same question:
I figured it out, I was referencing the column names incorrectly when dot-walking..
Ended up being glidefunction:concat(u_cost_center.u_cost_center,"-",u_gl_account.account_name,"-", u_vendor.u_name)
Just make sure you validate the dictionary names, I assumed I had it correct and you know what they say when you assume..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2020 09:10 AM
Have you tried using getDisplayValue()?
Ex: u_cost_center.getDisplayValue(), ' - ', ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2020 09:13 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2020 09:17 AM
Is the point to simply have one field that concatenates the values of others? It might be more optimal to just write a BR that checks if any of other other fields changed and then update this one with the appropriate display values as needed. That way it only runs when necessary and not all the time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2020 09:20 AM
Yes, that's what I'm trying to do. Maybe I will do that instead. It's just baffling because I know I've done it in the past with reference fields and now I can't remember how I did it.