April 29, 200619 yr 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!
April 29, 200619 yr 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
Create an account or sign in to comment