Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6339 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

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 by Guest
Posted

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.

Posted

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

This topic is 6339 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.