flora Posted May 3, 2005 Posted May 3, 2005 To the Forum I want my script to omit a record where a certain field is blank and then export the results in csv format. My script below results in an endless loop. I have elementary experience in writing scripts. Thank you for your help. Perform Find [ Request 1: Thol ] [ Restore find requests, Replace Found Set ] Go to Record/Request/Page [ First ] Loop If [ IsEmpty(Tr1) ] Omit Record Go to Record/Request/Page [ Next ] Exit Loop If [ IsEmpty(D2) ] End If End Loop Export Records
Vaughan Posted May 3, 2005 Posted May 3, 2005 Close... the trick to remember that after you omit a record, you have automatically moved on to the next record. Perform Find [ Restore find requests, Replace Found Set ] Go to Record/Request/Page [ First ] Loop If [ IsEmpty(Tr1) ] Omit Record Else Go to Record/Request/Page [ Next, exit after last ] End if Exit Loop If [ Status(CurrentFoundCount) = Status(CurrentRecordCount) ] End Loop Export Records Scripts like this often have problems with the very last record... they either fail to omit it, or omit the last record when it should be left in. So check it carefully before using it. On the other hand, why not include the TR1 field being empty in your original find request?
flora Posted May 3, 2005 Author Posted May 3, 2005 Beautiful, Vaughan... Every program's scripting language is just a leetle bit different. You saved me hours. Thanks.
Recommended Posts
This topic is 7147 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 accountSign in
Already have an account? Sign in here.
Sign In Now