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

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

Recommended Posts

Posted

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

Posted

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?

Posted

Beautiful, Vaughan...

Every program's scripting language is just a leetle bit different. You saved me hours.

Thanks.

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 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.