Very confused why this simple apex script doesn't work

   333   1   2
User Avatar
Member
86 posts
Joined: April 2019
Offline
Hi,

I'm trying to loop over a DictArray in apex script and add a subnet for each iteration of the loop.

If I construct the loop with a fixed range, like in the image below, it works.



However, if I construct the loop using the length of my DictArray, like in the image blow, it doesn't work.

I can verify that the length of the array is returning 1 so I cannot work out why no subnet gets added when I do this.



Any guidance would be most appreciated.

Thanks
Peter
Edited by mrpdean - May 30, 2026 04:16:41

Attachments:
works.jpg (335.3 KB)
not-working.jpg (335.5 KB)

User Avatar
Member
8153 posts
Joined: July 2005
Offline
Not really sure but I did a quick try with just a simple APEX Script SOP and it seems to work?

Edited by edward - June 4, 2026 19:52:07

Attachments:
screenshot.png (938.8 KB)

  • Quick Links