- 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 07:37 AM
Sounds like you need to create a client onLoad script that will look at the values in the MRV and populate the field and make it read only so they cannot change it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 07:40 AM
this is correct, the first value in the department [0] will determine the other department fields values > [1] in the array set

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 07:49 AM
So you should just need to get the value of the variable and use JSON.parse to convert it to an object and from there is should be easy to do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 07:50 AM
i am trying it but no success, any suggestion on how to write out the script for it?