- 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:11 AM
i created this script to push the Type into the MRV but it shows a blank value in the MRV reference variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 08:12 AM
Also i like to expand on the script for when they select the Type a popup window will appear to ask how many items for them to enter and then it will create those rows below
'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 08:48 AM
i was able to get it to work by changing the Type variable to a reference but now the GL code Ref. Q. doesnt seem to work

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 08:50 AM
Well I thought you could just do a g_form.getValue("MRV NAME"); but that does not appear to work on Service Portal or I'm getting the name wrong on my end.
So a little experiment and I found you could use
this.myVar = "The value they selected";
So you can use an onChange script to set the value and then use an onLoad script to set the value for the new row and mark it read only when it has a value.
If you are not doing this on Service Portal you can try parent.g_form.getValue("MRV_NAME") to see if you can get the value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 08:54 AM
do you have the full code?