So im trying to make an on screen number pad for my one layout . Here is the screenshot. How do i bind the 1 key button to =1 . It cant be as simple as insert text 1 to the a single field is it ?
Assign a script step (not a script) to your "1" button.
The script step is: Insert Text ["1"]. Uncheck the checkbox that sais "Select entire contents".
The text "1" will be inserted wherever your cursor is. When your cursor is not in a field, nothing will happen. If text is selected in a field, the selection will be overwritten. It does the same as typing "1" on your keyboard.
The same with all your other number buttons.
The 'tab' button will be: Insert Calculated Result [ Char ( 9 ) ]
The 'enter' button will be: Commit Records/Requests
I'm not sure what your arrow button should do
Only issue with the insert text method is it overwrites the current value in the field if you push another button.
You can have a script that appends the number you pressed on at the end of the field. It would look like this:
set field [yourTable::yourField ; yourTable::yourField & 1] for 1
set field [yourTable::yourField ; yourTable::yourField & 2] for 2, etc
or set field [yourTable::yourField ; yourTable::yourField & Get ( ScriptParameter) ] where the script parameter is the number corresponding to the button.
Hope this helps!
Chloe im a little lost here.
So if i set every number as insert text to the target field, where do i put the script you are suggesting to append the number so it doesn't delete ?
Well, Set Field is the scrip step you associate with the button. No need to use Insert Text here.
If you set the field to himself then the number, it won't delete what was entered previously as it is set to be himself with something appended to it.
Or maybe I didn't understand what you want to do!
I got it now chloe. Genius . Thank you.
The arrow would be the backspace button
To delete the character in front of the cursor?
That's more complicated. Probably you'd need a full script here. First select the one character then delete it. Probably you'd need also to check if the cursor is on position 0 (no characters in front of it) and in that case do nothing.
Also you would have to check if there's already a selection active and in that case delete that selection.
It would be delete the characters behind the cursor.
Not a consistent behavior...
no cause its for a 4 digit pin number field. If they screw up the can just delete the digits and retype. There would be no way for them to get the cursor before the characters.
Here is a sample database
Dropbox - TouchKeyboardSample.fmp12
Naah, it's just a set field - active field set to left (active field, length(active field) - 1)
Thanks Schamblee. I never would of been able to figure out that delete key. Appreciate it.
Then it's assumed that the cursor is on the end of the text...
I have create a new sample that will allow the cursor to be place in the middle of digits so you can delete or add new digits in the middle of the text field.
The other download link should still work, but here it is again.
Yes, like in a calculator or pin entering console.
Retrieving data ...