May 3, 200520 yr 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
May 3, 200520 yr 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?
May 3, 200520 yr Author Beautiful, Vaughan... Every program's scripting language is just a leetle bit different. You saved me hours. Thanks.
Create an account or sign in to comment