ATF: Edit MRVS rows?

kchorny
Tera Guru

I have a catalog item that requires data to be collected in an MRVS. Once the RITM is created, the first task requires additional data to be added to the existing rows in the MRVS. 

 

I don't see a test step for editing existing MRVS rows. Am I missing something? If there's not an existing test step, has anyone found a way to do this via a script step? 

3 REPLIES 3

kchorny
Tera Guru

I ended up having to do this in 4 steps PER VARIABLE that I needed to update:

1. Record query on sc_multi_row_question_answer table

where Parent ID is my RITM (which I queried for in an earlier step) and Question = the variable I need to set

2. Open an existing record (the record found in the previous step)

3. Set field values - set the 'value' field to the appropriate value for that variable.

4. Submit a form

 

So, since I had 5 variables in the row that I needed to update, I had to use 20 steps to accomplish this goal.

 

If anyone knows of an easier/more efficient way, I'm all ears.

I was thinking this could be done in a single Server Side Script step where you query for all the Multi Row Question Answer records where Parent ID is your RITM. Then loop through each of the returned records and depending on the Question value, make the desired change. Maybe using a case switch statement where there's a case for each "Question" value.

After looping through all the return MRVS question answer records, do an gr.update() to save it.

Shanti5
Tera Contributor

I am also struggling to edit mrvs in service portal catalog items. any recent update in steps pl let me know.