Need to have a display value different from the one set on the table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2025 09:45 AM
Need to have a way to show a different display value from the cmn_department table, currently the display value (dictionary table column display:TRUE) is "Name". I know how to set this on a Variable where it will show whatever other column I want it to show. BUT how can I do the same on a form?
I've added a new reference field on the Demand form referencing the cmn_department table, but I need it to show a different column (ie. Business unit, currently displaying the Name). I cant use dictionary overwrite since this is a new field on the form (not coming from a parent). And I dont want to change the whole system just for this form. how could I get this done?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2025 09:52 AM
If you want to display the business unit, could you make the reference field to the Business unit (business_unit) table instead?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2025 09:57 AM
The business unit was just as an example, I'm looking more into displaying such as "code" or maybe "ID", any ideas will be appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2025 09:57 AM
Hi @marperezgon ,
use client script on load
(function executeRule(current, previous) {
var deptField = gForm.getReference('your_reference_field_name', function(ref) {
if (ref) {
var displayValue = ref.u_business_unit || ref.name; // fallback to name
gForm.setDisplayValue('your_reference_field_name', displayValue);
}
});
})();
Chandan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2025 09:57 AM
use client script on load
(function executeRule(current, previous) {
var deptField = gForm.getReference('your_reference_field_name', function(ref) {
if (ref) {
var displayValue = ref.u_business_unit || ref.name; // fallback to name
gForm.setDisplayValue('your_reference_field_name', displayValue);
}
});
})();
Chandan