August 17, 200421 yr New solution in Dev7. The script goes to a layout with the correct records in a portal then loops through the rows setting fields and is supposed to exit after last row, but does not. Script portion as follows: Go to Portal Row [select; First] Loop Go to Field [select/Perform; GAMES::weekNumber] SetField [GAMES::someField; value] ... Go to Portal Row [Next; Exit after last] End Loop ... rest of script It never exits when it gets to the last portal row number. It makes new records. Running this in debug mode. I expect I am doing something silly, but this seems pretty straight forward.
August 17, 200421 yr I don't believe this will work in a portal with a relationship set to allow creation of related records. Once you get to the last row, you're creating a new related record. It might work to add an Exit Loop If [Get(PortalRowNumber) = Count(relationship::serial)] just before the Go to Portal Row [Next] step, and remove the then redundant 'Exit after last' option. Note that the Go to Field step is probably unnecessary if you're already in the portal row.
August 17, 200421 yr Author Thanks Queue. That did the trick. As an aside, I find myself often taking a very long time to wrap my head around the new paradigm in relationships in v7. I appreciate the help.
Create an account or sign in to comment