- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 07:21 AM
good morning everyone,
so i have a trick request to configure,
i have an MRV with a reference variables that is looking up on the cmn_department table
i want to have the ability to auto fill the other row users will select with the same value they selected in the first row of the MRV.
Example:
the Department Column u selected Office Expenses
i want every other row to only show Office Expenses and not have the users be able to select anything else but Office Expenses base on their first row
so all other rows will only have the Office Expense and nothing else
is this possible with an onChange script?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 08:07 AM
Consider having Department variable outside of your mrvs in the form as well.. After the user selects this form Department variable and is adding first mrvs row, use onLoad script within mrvs to set the read-only mrvs Department field using below script:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 08:59 AM
No I did not write out the full thing. I just used an onChange script to set a dummy value and then checked to see if that value was still there when the MRV Add form loaded.
But its simple code
//In an onChange for the department field
this.savedDepartment = newValue;
//In an onLoad script for the MRV
if(this.savedDepartment) {
g_form.setValue("department", this.savedDepartment);
g_form.setReadOnly("department", true);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2024 01:52 AM
To implement your task you need to use the onChange script. This script will automatically populate other rows with the same value that was selected in the first MRV row. First get the value selected in the first row. Then set the same value for all subsequent rows. You also need to restrict the ability to select other values in subsequent rows so that users can only select the value that was selected in the first row. This can be done using the onChange script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 05:59 AM
yes this is what i am trying to do, but i cant workout the script to implement it.
all attempts on an onChange Script bases on the Department inside the MRV is not successful

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 07:54 AM
Did the suggestion and code sample I gave you not work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 07:57 AM
i am sorry to say but it didnt 😞