Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Can you script a "10 key" pad?

Featured Replies

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!

Sure, use Insert Text as the button action.

  • 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?

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. :wink2:

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 by Guest

Make sure "Select Entire Contents" is NOT checked.

Michael

  • Author

Aggravatingly easy and simple, I just didn't look in that particular location! Thank you so very much!!!

Exactly - and that 'Go to target field' is.

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.

  • 8 months later...

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.

Shameless Bump

It'd be better to clarify your issue.

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?

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?

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 by Guest

I'm

Edited by Guest

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.