AnsweredAssumed Answered

Field navigation and script triggers

Question asked by K.Feete on Jan 1, 2013
Latest reply on Jan 7, 2013 by philmodjunk

Title

Field navigation and script triggers

Post


     Hi all.

     I'm trying to set up a slightly complicated inventory system using a barcode scanner and Filemaker 11. For each item there are four scans to be made, identifying the location the item came from, where it's gone to, the item, and the quantity. This is all being done by a nifty little Intelliscanner which gets carted around and plugged in at the end of the day, dumping a load of scans into my Movement Records layout at once.

     Now so far this is working. However, I figure it's only so long before someone forgets to do one of those four scans and throws all the data off, so I was trying to run OnExit script triggers in each field that looked at the data, saw if it was in the wrong field, and moved it to the right one. This also works, but, if the script excutes (eg if it finds data in the wrong field and moves it), the buck stops there -- the cursor stays in the new field. So the next scanned barcode gets dumped into the wrong field, thus worsening the problem I was hoping to solve.

     I first tried to fix this by adding a Go To Object command, then mucked about a bit with Exit Script. No dice; the cursor stubbornly stays in the field it has just moved data to. I assume it has something to do with the script triggers piling up, since I have one on each field, but that's as far as I got before getting stuck. These are the first scripts I've tried to write, and I think I'm in over my head.

     Help?

     (I've screenshotted the script that runs in the first two fields, in hopes that I've made some sort of obvious error....)

Picture_1.png

Outcomes