March 6, 200718 yr Hi all. I have a small but infuriating problem. I have a script that sits in Find mode waiting for the user to scan in a barcode, once scanned it does a new find request and loops, doing it all over again. Once the user is happy they press a button on the layout and the current script exits and it goes off and finds the various barcodes. Great....except that the person doing the scanning can be up to 30m away using a bluetooth scanner, and so the terminal is prone to another user coming up to it and pressing the buttons (despite big warnings all over the screen!), losing all the finds done so far and generally mucking it up for the existing user. What I'd like to do is whenever a button is pressed on this layout it pops up a dialog that says 'are you sure because userx is scanning'. If they're sure then fine it goes off and does its stuff, If not I want it to go back to resuming the script where it left off ...but I can't get it to!! As soon as a button is pressed, that either exits or pauses the script and your left at best in find mode or worst out of the search requests completely. Any ideas much appreciated! :qwery: To give you as much info as possible, here's how the script works: Enter Find Mode Go to Entry Field Pause (indefinitely) New Request Go to Entry Field Loop Pause New Request Go to Entry Field End Loop
March 7, 200718 yr It's a bit difficult for me to test for you because I can't scan. But changing your button specification to Resume appears to disallow another selection of the script - it ignores it and keeps going. You can watch the request count continue upwards instead of starting over (in the status area). But then, I don't know how your Perform Find (or stop) button is specified. If that won't work for you, you can also write the script name to variable (global) at start and clear it at the end of your scanning script. Then test at start whether it has a value (untested).
March 7, 200718 yr I would scan into a global field, in Browse mode. Then, if someone presses 'New Find' and the global is not empty, they get a warning. If they choose to to continue, the data can be transerred to another global, and retrieved from there later.
March 7, 200718 yr Author Thanks for that I'll give it a try. You don't need to scan to be able to test by the way, all the scanner does is enter some data in and then simulates pressing the enter key, so just doing the same works without a scanner. Cheers
March 7, 200718 yr Author LaRetta - thanks for that. It's better than it was as it will at least now carry out the find and import that's it's supposed to do so at least I can keep what they've already input. Cheers - time for bed!!
March 7, 200718 yr I don't believe my suggestion is the best; in fact, I've broken it. Really, Comment's suggestion would be much safer and would work reliably. Just a thought ... :(
March 7, 200718 yr Author Unfortunately, using a global is no good as they might be inputing hundreds of barcodes in any 1 session. The only other way I can see is to not use a Find routine to choose the files that are changed but to use a holding table, with a New record loop that then imports -> amends the records. That way at least it would keep the records it's already created. Your first suggestion is however a good temporary fix until I get the scripts updated. :)
March 7, 200718 yr So what if you have hundreds of barcodes in any one session? FileMaker 8.5 has a 1 billion character limit per field... Even if 7's is smaller, i doubt you'll have issues fitting even if the limit was a million characters.
March 7, 200718 yr Author Hi Alex - I'm not sure what you're driving at (pun intended ). 1 global field will not hold more than 1 value at a time, however if I'm being particularly dull I'd be delighted to be enlightened.
March 7, 200718 yr It may only store "1 value" but it depends what you define as one value... you have something called delimiters in your tool kit, e.g. 12321321321321¶ 12321312321333¶ 12356t90980980¶ 198u0980980980¶ 09809809809809¶ 89798798798799 Is really 6 values... but it can be put into one field -- and then scriptually pulled apart to generate the requests required. Lol, love the pun
March 7, 200718 yr Author Thanks Alex - I see your point but delimted is no good for the purposes of what I need - in fact we originally used something similar to this but the users needed to see a definitive entry per scan. It may only be for re-assurance purposes but that's what they wanted!! Anyway we've got them to accept that best practice is that if it's on that screen, they just don't touch it! Thanks all. :)
March 7, 200718 yr ... Well hold on, you could simply relate your global field to your products table and instantly have a portal of all products scanned in.. That way there's no finds involved at all. And even if another user does do something, the original user will have the first scan set.
March 7, 200718 yr Just to emphasize the example.. You must feel so lucky, you get to play with bar code scanners! And blue tooth ones at that lol. Add a thousand products if you want, the principle remains the same... portalExample.zip
March 7, 200718 yr Author Thanks Alex - neat idea. I'm going to look into it later and see if it works for what they need. I'll report back... WTS Cheers
Create an account or sign in to comment