- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2022 06:24 AM
Hello,
I currently have 3 fields on an item:
1. Code search
2. Tray ID
3. Tray Name
I also have a custom table with 3 columns (u_nhsl_tray_codes_choices).
The user will select a code from 'code search', this code will have a tray id and tray name associated with it - I want to populated field 2 and field 3 with the corresponding column values, this way the user will see their selected code, ID and name across the 3 variables.
How can I achieve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2022 09:59 AM
I've managed to fix this using the following 'onChange' script, and turning the 2 and 3 variables into single line texts.
function onChange(control, oldValue, newValue, isLoading) {}
var trayTable = g_form.getReference('u_rmd_and_tray_search', populateTrayID);
function populateTrayID(trayTable) {
g_form.setValue('u_tray_id_readonly', trayTable.u_tray_id);
g_form.setValue('u_tray_name_readonly', trayTable.u_tray_name);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2022 07:46 AM
Originally, is that still the requirement or changed?
How are you certain that other 2 fields will lead to 1 single record only?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2022 07:54 AM
So in this example, RMD A000456 has a Tray ID value and a Tray name value, I just want those to display to the user.
Tray ID and Tray name will be read-only values.
Some RMD values have multiple entries, so A00000 might have ID 100 and name 200, and another might have ID 200, and name 300. It is only for display purposes, so as long as the RMD is selected, it should just pull the other two values for display
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2022 09:59 AM
I've managed to fix this using the following 'onChange' script, and turning the 2 and 3 variables into single line texts.
function onChange(control, oldValue, newValue, isLoading) {}
var trayTable = g_form.getReference('u_rmd_and_tray_search', populateTrayID);
function populateTrayID(trayTable) {
g_form.setValue('u_tray_id_readonly', trayTable.u_tray_id);
g_form.setValue('u_tray_name_readonly', trayTable.u_tray_name);
}