March 4, 200817 yr I am working on a database that is mostly mouse based, meaning all boxes are drop down menus or calendars. All input can be done with the mouse. There is one field, Serial Number, that I have to go to the keyboard to enter data. I am wondering if there is a way to enter the numbers into this field using a 10 key pad in the layout. Button "1" would enter a 1, button "2" would enter a 2. Thanks in advance for any help on this!
March 4, 200817 yr Author Yes, that works, but only once. I can get it to do a "1" or a "2", but I can't figure out how to string them together to make "56199" for example. Is there some use of a loop function that I don't understand?
March 4, 200817 yr I've done this before. Create a script with: Set Field [ yourField ; yourfield & Get ( ScriptParameter ) ] Then create one button and attach the script. Then duplicate the button and change button 1 to script parameter 1 and so forth. UPDATE: To quickly change the numbers on the buttons, use the A icon in the Status area, click it then click the number, change it and go to the next button, duplicating for all of them you need. Edited March 4, 200817 yr by Guest
March 4, 200817 yr Author Aggravatingly easy and simple, I just didn't look in that particular location! Thank you so very much!!!
March 4, 200817 yr The reason why I don't use Set Field[] for this is to have the cursor in the field. A more sophisticated version would also allow moving the cursor and inserting/backspacing at any position.
November 6, 200817 yr Hi! I've been trying to get to grips with this but i'm failing! I'm new to FMP9 and scripting. I've tried making a button and attaching a script to it. I can't see what parameter to put in, i've tried putting '1' in for the button one or '2' etc, but then i get an error saying the Get command needs more input, or something. Can anyone explain it to me again? If i use the Set Field option, i can only choose which field to input it in, then to add the parameters, i must use a calculation? What is that calc? Thanks for any inputyou can give me! Harry.
November 7, 200817 yr Hi! Thanks for your reply! OK, i need a 0-9 keypad on screen. A user hits the buttons 48556 and this number comes up in a seperate field. I don't understand the solution above, some of it seems a bit disjointed to me. What scripting function would i use?
November 7, 200817 yr The script above: Set Field [ yourField ; yourfield & Get ( ScriptParameter ) ] Then create one button and attach the script. Then duplicate the button and change button 1 to script parameter 1 and so forth I don't understand. SetField, enter in the field i want the informaitno to go; both of those i understand. The Get (scriptParameter) i don't. What is the parameter?
November 7, 200817 yr I am sorry, but I have the feeling you are asking me to reproduce several pages of Filemaker's help here. I suggest you study the Set Field[] script step and the Get ( ScriptParameter ) function. Also take a look at how to define a button to run a script with a parameter. Just in case I am missing your problem entirely: you need 10 buttons that run the same script. Each button is defined to have a parameter of a single digit, from 0 to 9. Edited November 7, 200817 yr by Guest
Create an account or sign in to comment