Record Producer with MRVS not inserting rows into time_card table on submit

burrapravee
Tera Contributor

Hey ServiceNow Community! 👋

I'm a ServiceNow intern and I'm working on a Timesheet Entry Record Producer in the Service Portal
and I'm stuck on getting MRVS data to save into the time_card table.
Would really appreciate some help! 🙏

 

📌 My Setup:
- Record Producer target table: Time Card [time_card]
- I have a Multi-Row Variable Set (MRVS) with these columns:
✅ Category
✅ Customer
✅ Implementation
✅ Role
✅ Sunday
✅ Monday
✅ Tuesday
✅ Wednesday
✅ Thursday
✅ Friday
✅ Saturday

 

❗ Problem:
When the user fills in the MRVS rows in the Service Portal and clicks
Submit, the data is NOT getting inserted into the time_card table.
No records are being created at all.it sometimes inserting but with all 0 values

 

🔍 What I've already checked:
- Business Rules on time_card table ✅
- Script Includes ✅
- Client Scripts on the Record Producer ✅

None of them seem to be causing the issue.

 

❓ My Questions:

1. What is the correct way to loop through MRVS rows in a Record
Producer script and insert each row as a separate time_card record?

2. Should I use JSON.parse(producer.mrvs_name) or
producer.mrvs_name.getRowCount() approach?

3. Is there anything specific to Service Portal that could be
preventing the insert?

 

Any working script examples or guidance would be really helpful!
Thank you so much! 😊

1 REPLY 1

Tanushree Maiti
Tera Patron