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

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

Recommended Posts

Posted

I'm trying to develop the following script that deletes records from a portal (based on a self relationship) and stays in the same layout until the final record in the portal is reached, and then deletes that record and goes to a different layout. I can't get this to work:

If [Get(PortalRowNumber) = 1]

Delete Record/Request[]

Go to Layout ["Navigate" (QuestionBank)]

Halt script

End If

Delete Record/Request []

Thanks!

Posted

If you are aiming to delete only the related records why don't you try the following instead:

If [ Count(NonEmptyField in your portal TO) > 0 ]

Freeze Window

Go To Related Record(s) [Your self join table]

Delete All Records [Perform Without Dialog]

Go To Layout ["Navigate" (Question Bank)]

Halt Script

End If

Else, if you want to delete all related records, aswell as the current record what you do is enable the checkbox in between your relationship "Delete records in this table when records are deleted in the other table"... or something.

That way, if you delete record in your main TO, all related records will also be delted, making your script a lot easier:

Delete Current Record[Perform Without Dialog]

Go To Layout["Navigate" (QuestionBank)]

Goodluck,

~Genx

This topic is 6785 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.