July 18, 200718 yr I was trying to modify the duplicate portal records of a found set of the original records themselves + the duplicates to distinquish between each other. I couldn't get the next record, exit after last function to work properly and came up this work around. (see attached) Does anybody see how this script can be improved? Script_question.pdf Edited July 18, 200718 yr by Guest
July 18, 200718 yr That script looks like it may work... I didn't test it but I would suggest actually going to the related records and duplicating them there. The loop you would have to make would be much simpler. Duplicating in portals is definitely not the ideal way of handling this situation. Here is what this script would look like: GTRR loop go to record first duplicate //set fields you want to set here omit record go to record first omit record end loop This is slightly better but still not ideal. The best way of handling this problem is to create a parameterized create record script. Now your script is much easier to write(and read) go to record first loop perfrom new script go to record next, exit after last end loop The parameterized script is a little more difficult to tackle but would be worth it in the long run... There are lots of posts around here that would help you with that if you aren't already familiar.
July 19, 200718 yr Author Thanks as always -- the script was for use after getting the related records ... I will explore:)
July 19, 200718 yr I actually realized that a little earlier today... sorry my brain turns to mush at night.
July 19, 200718 yr Hope you don't mind, but the algoritm could be less clunky: Sort Records [ Specified Sort Order: Untitled::Record; descending ] [ Restore; No dialog ] Go to Record/Request/Page [ Last ] Loop Duplicate Record/Request Go to Record/Request/Page [ Previous ] Omit Multiple Records [ 2 ] [ No dialog ] Exit Loop If [ not Get ( FoundCount ) ] End Loop Put inside the manditory GTRR and Go To Layout[orignal] --sd
July 19, 200718 yr That is a cool way of doing it... my brain still can't loop backwards though. It definitely would work better. Thanks Soren.
Create an account or sign in to comment