Delete rows from MRVS in workflow

Ruchi Kumari1
Tera Expert

Hi,
Is there any direct method to delete MRVS rows in server side script like what we have similar to addRow() ? Or i need to gliderecord 'sc_multi_row_question_answer' table and delete records there ?
The resources available in community mentions about removing values in client scripts. However, I am looking for a solution to remove rows in workflow script (on RITM).

11 REPLIES 11

@Ruchi Kumari1 

As already informed you can always edit the MRVS variable after submission by manipulating the JSON

Why you wish to update the parent RITM MRVS? Let it have all the rows

The child RITMs should have only rows for that user

Example: RITM001 is for user id 11 then that RITM's MRVS should have only those 2 rows and not the rows for user id 22

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi @Ankur Bawiskar , I need to update the parent ritm as well. Because the requested for is one of the user selected. So it should display asset specific to that user.

@Ruchi Kumari1 

Consider parent RITM has 3 Users and each user has 3 assets, so total 9 rows in MRVS

You are creating 3 Child RITMs and each RITM should be raised for each user and MRVS in each RITM should have only 3 MRVS rows for the asset belonging to the user associated to the current RITM

Why you wish to update parent RITM?

Out of those 9 MRVS rows in parent RITM -> which one you want to remove?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

The users selected on form, gets updated in requested for field of different ritms.
The first user in the list goes to parent RITM. So This RITM is expected to have only related machine names.

@Ruchi Kumari1 

The users selected on form, gets updated in requested for field of different ritms. -> this part I understood

I still didn't understand why you wish to update parent RITM.

That's fine if I am not able to understand, but I already informed you can play with MRVS of parent/child and keep only the rows you wish

what script did you try and where are you stuck?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader