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

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

Recommended Posts

Posted

Hi

I have a very simple loop. The layout has 110 fields and the script copies the first field and pastes into the next field. It loops 55 times using a counter and exits.

It works fine with FMP8 advanced, but when I use fmp8 it crashes.

Privledges are the same.

Any ideas?

Posted

My only experience with crashing FMP and looping scripts is if you are using a recursive method i.e. the script is calling itself.

Are you sure this is the best way to copy the data?

Consider using the "Replace Field Contents" script step. It is significantly faster and will simplify your script.

I doubt it is a privilege thing.

Posted

Ideal, I've heard about using calculated replaces, but how would you apply it to replace a loop?

Ray, my file is too big to post.

It crashes fmp8 during remote and when its running independently on fmp8. version is 8.02

Posted

Here is my script:

Go to Field [ Copy_Last~Audit::q1 ]

Set Field [ Preferences::gCounter; 55 ]

Loop

Copy [ ] [ Select ]

Go to Next Field

Set Field [ Preferences::gCounter; Preferences::gCounter-1 ]

Paste [ ] [ Select ]

Go to Next Field

Exit Loop If [ Preferences::gCounter = 1 ]

End Loop

Set Field [ Audit::Annual; "X" ]

Posted

... try using variables instead... secondly, if its the same value to 55 fields, your copy shouldnt be in the loop... and for the same reason neither should the first goto next field...

~genx

Posted

Put pauses in your script after every step. You need to be able to see that the copy/paste is working and that your global is decrementing

Is the field tabbing sequence correct? Go To Next field relies on that.

You say taht FMP8 crashes - are you sure it isn't just stuck in an infinite loop?

Posted

... thats what i thought the problem may have been, but then why would it work in fmpa? and then i was going to recommend debugging... but it works in fmpa so...

~genx

Posted

Each value copied is different. Basically its a previous report that is copied field by field for a new report. I can't duplicate the record because I only need some of the data.

When I say it crashes, it closes the file and closes filemaker pro 8. It happens about a half second after the script is called so I dont see how could loop infinetely.

The wierd thing is that it works fine on fmp8a.

Posted

.. ok well this is my last idea... try opening and hosting the file on one machine on fmpa and then opening the file remotley on a machine with fmp8 installed and see what happens... then if that doesnt work, try running the script in fm7dev and if it doesnt work debug... cause like i said im running out of ideas... finally.. if nothing works, post a sample file and let someone else try running it on fmp8, it might just be your copy of fmp8... in which case you could also try a re-install

~genx

Posted

... try using this instead...

Go to Field [ Copy_Last~Audit::q1 ]

Set Field [ Preferences::gCounter; 55 ]

Loop

SetVariable[$Contents ; Get(ActiveFieldContents)

Go to Next Field

Set Field [ Preferences::gCounter; Preferences::gCounter-1 ]

Insert Calculated Result [ $Contents ]

Go to Next Field

Exit Loop If [ Preferences::gCounter = 1 ]

End Loop

Set Field [ Audit::Annual; "X" ]

i just figure we should try substitute the copy and past functions for something else, see if it helps...

~genx

Posted

Test the script step by step as I suggested - then you will find out what the problem is.

You can't fix it until you know what the problem is.

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