MRVS - Is it possible to get current Row # without another variable in the Variable Set?

Shane J
Tera Guru

In a Multirow Variable Set, I want to hide a checkbox when someone tries to edit the first row only.  My checkbox is used to copy the contents of the previous row to the current one (while in the MRVS pop-up form), so it's not ideal that it shows on a row it can't be used.  I do have a Client Script that hides it when the first entry is made, but after that...

 

I want to avoid adding a 'Row Number' variable just for this, mainly because I have no way to hide it.

 

Is there no mechanism to 'get current row #' OOB?

3 REPLIES 3

Anubhav24
Mega Sage
Mega Sage

Hi @Shane J ,

Can you try to count the rows when a change is made in multirow variable set , and see if the count returns 1 then do your operation and if count is greater than 1 then stop the operation upon onsubmit or inform the user accordingly.

Getting the full count only works for the first entry, everything after that the logic doesn't work because you don't know what row you're currently on.

Ankur Bawiskar
Tera Patron
Tera Patron

@Shane J 

you won't know this as OOB there is nothing to determine this.

may be you can detect add/remove of row and check this

MRVS detect when a row is removed or deleted

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