In Pro with multiple portals, I've had to name the portal objects, so I can script a commit records, then go to the correct portal, then the correct portal row ($row passed as a script variable).
You may need to pass a combined script variable: portal_name & portal_rowNumber, then parse it into 2 variables in the script, filtering for letters for portal name (don't use numbers in the portal object name), and filtering for numbers for portal row.
Have not tested this in IWP with multiple portals, but did find that, even in Pro, the lack of an explicit commit records step often left users hanging without the delete portal row button executing. And it gets even harder if the portal is sorted. The commit can then cause the portal row to change, so you need to capture a record ID and then walk the portal until you find the matching record ID in a portal row.
Hi Stephen. I'll try that now. I'll let you know how I make out.
Thanks for your response!