Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5858 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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!

Posted

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?

Posted (edited)

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
Posted

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

Posted

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...
Posted

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.

Posted

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?

Posted

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?

Posted (edited)

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

This topic is 5858 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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