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

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

Recommended Posts

Posted

Can any of you Windows wizards help me out?

I am looping through a found set and calling a Send Event on each one. Trouble is, the Send Event for record 1 is still executing when the Send Event for record 2 is called.

Since I am appending echoed text to a file, the data from different records is getting dovetailed together. Not good.

Here is the calculation I am calling with Send Event:

"cmd /c echo & Substitute ( Contact Info ; "r" ; " >> c:" & New Filename Global & " & echo " )

( "r" is actually the paragraph symbol in the real script )

So, the calc result on a typical record would be somthing like:

cmd /c echo Name: Jetson, George >> c:myFile.txt & echo Company: Slate Gravel >> c:myFile.txt & echo Address: 246 Sycamore Street >> c:myFile.txt & echo City: Decatur >> c:myFile.txt & echo State: GA >> c:myFile.txt & echo Zip: 30030

Is there anyway on Windows to make FileMaker wait for a response from the Send Event script step? On the Mac you can specify "Wait for event completion before continuing" - I find no such option on the PC.

Putting a FileMaker Pause script step solves the problem, but the minimum delay is 1 second, so for 50,000 records... well you can do the math.

If I can't make FMP wait for a reply, maybe there is a way to rewrite the batch script to be quicker...

Thanks for any help,

j

Posted

One option would be to have Send Event call a batch file that writes a 1 to another txt file when it completes. The batch file would accept the passed parameter and perform the operation. FM would run a loop, importing the text file into a global after each pause and only continuing when the global contained 1. Of course, the batch file would need to write a zero to the txt file before performing the other operations and FM would set the global to zero at the beginning of the script.

  • 1 month later...
Posted

Thanks for the reply - I was looking for something a bit more lightweight, but your suggestion would probably work. Ultimately, the need for the functionality I described went away, but thanks anyhow.

Thanks,

j

Posted

Thanks for the reply - I was looking for something a bit more lightweight, but your suggestion would probably work. Ultimately, the need for the functionality I described went away, but thanks anyhow.

Thanks,

j

Posted

Thanks for the reply - I was looking for something a bit more lightweight, but your suggestion would probably work. Ultimately, the need for the functionality I described went away, but thanks anyhow.

Thanks,

j

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