Show name instead of sys_id in string field populated by variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2016 12:48 AM
Hi,
I have a variable which is referencing a list of data in a bespoke table (x_yobs_regulatory_regulatory_breach_tier_1)
The variable is tier_1
I want the name of the data entry to appear in a mapped string field on the associated table instead of it's sys_id. The field needs to be string for another purpose so this cannot be changed.
Currently when the form is submitted it show the sys_id as below but I need it show show the label/name
How can i achieve this?
Thanks in advance.
Emma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2016 01:53 AM
Hi David,
No it's needs to be string for other reasons...
Thanks for your reply.
Emma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2016 02:29 AM
Hi Emma,
Try this line of code instead:
current.tier_1.setDisplayValue(product.tier_1.name);
I had a similar issue recently and this resolved it for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2016 02:36 AM
Hi, thanks for your reply - still not working I'm afraid.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2016 02:39 AM
You could try:
current.tier_1.setValue(product.tier_1.name);
(just changed from setDisplayValue to setValue)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2016 02:42 AM
Another possibility :
product.tier_1.getValue(current.tier_1.name);