- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2022 11:18 PM
Good Afternoon,
I am trying to add text to the short description on a record producer. It is a combination of some static text and the value of a a variable on the record producer and I am having a bit of trouble.
The short description should display "Printer Fault" + the value of a variable.
The variable name in this example is "machine_number"
I have added a script current.short_description = "Printer Fault - " + current.variables.machine_number;
When the record is created the short description display "Printer Fault - undefined".
Can someone please tell me what is wrong here?
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2022 11:22 PM
Hi,
Assuming you are passing above in record producer script you need to replace current with producer. So,
current.short_description = "Printer Fault - " + current.variables.machine_number;
should be
current.short_description = "Printer Fault - " + producer.machine_number;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2022 11:22 PM
Hi,
Assuming you are passing above in record producer script you need to replace current with producer. So,
current.short_description = "Printer Fault - " + current.variables.machine_number;
should be
current.short_description = "Printer Fault - " + producer.machine_number;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2023 10:13 AM
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 09:19 AM
And you can get the text (display value) with the following code:
current.short_description = "Printer Fault - " + producer.machine_number.getDisplayValue();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2022 11:26 PM
Thanks so much. This fixed the issue.