Thank you I'll try that.
Interesting it has only happened on a couple of computers when this same
script has been used for many years on dozens, probably even a 100
computers.
Lee
Jonathan Fletcher wrote:
Tim is right, Lee. You should just use a Set Field script step. The
copy-and-paste route can fail due to other things that can happen to
the clipboard when you're not watching.
I suspect that if you use the script debugger in FM advanced and watch
the values in the data viewer you will see that it will perform the
paste script step but nothing gets written. This is why.
Instead try:
Set Field [ myTable::amountPaid ; myTable::invoiceTotal ]
If you absolutely must make it a two step process then do this:
Set Variable [ $amount ; myTable::invoiceTotal ]
Set Field [ myTable::amountPaid ; $amount ]
That is way more reliable than the clipboard.
You found out the hard way how unreliable copy-and-paste is.
j.
On Jul 2, 2009, at 9:06 PM, Lee wrote:
Tim,
The table has an invoice layout which totals the products sold as an
invoice total. When a client pays the whole invoice amount the
operator selects the appropriate 'paid' button which then performs a
number of commands to record the details of the payment. One of the
commands is to place the invoiced total in an 'amount paid' field
which is part of a calculation that determines if the invoice has
been paid in full. (Part payments are also received for some
invoices). It's the two lines in the script that copy the invoice
total and then pastes it in the amount paid field where the problem
occurs. When determining the problem I placed a pause script after
the copy the invoice total line and found that it was not copying the
invoice total. This was only possible as I was able to reproduce the
problem on one invoice, otherwise its not possible as the problem is
intermittent.
Lee
Tim Mansour wrote:
2009/7/3 Lee <[email protected]>:
Any clues or has anyone else experienced this problem of the
process jumping
a line in a script ?
I doubt it's "jumping" the line. If pausing (sometimes) cures the
problem it suggests an issue with syncing with the system clipboard. I
have to ask, though, where are you copying from? Using copy-and-paste
within FileMaker is unnecessary.
--
--
Jonathan Fletcher
FileMaker 9 Certified Developer
FileMaker 10 Certified Developer
Project Foreman
NewMedia Construction Co.
[email protected]
Instigator
The BB&J Network
The "Go-To Guys" for
FileMaker Development in Louisville
www.thebbandj.net
FileMaker Louisville Blog and Podcast:
www.filemakerlouisville.posterous.com
--