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

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

Recommended Posts

Posted

I'm a teacher with ~50 students. I used to employ Excel to keep track of grades, but more recently I've been shifting to using Filemaker, as it enables me to send out grade automated reports via email.

But I still find Excel a lot more efficient for basic data entry tasks. For instance, I can hit "return" or "down arrow" to quickly move down through a data column, recording all students' grades for given assignment. I recently upgraded from FM 7 to FM 10, and the "Table View" is great for viewing my students' data in an Excel-like format. But I can't figure out what keystroke will move me rapidly down through the data column, from one record to the next, keeping the cursor in the same field.

So at present I'm doing data entry in Excel and then importing it to FM. The import phase is a bit time consuming, though, and I'd prefer to spend less time in crash-prone Excel.

How do you pros handle this sort of data entry? Is there a trick I'm missing that makes it easy in FM? Or should I stick to doing entry in Excel and just write a script to automate the import process?

Posted (edited)

This can now be done with script triggers. Since you have FM10, check out this demo.

Demo requires FM10.

http://fmforums.com/forum/showtopic.php?tid/200620

Edited by Guest
Added Link
Posted

Good one. :

Sorry I decided to put it to its own thread.

Posted

Pretty cool. Thanks for the demo. Where did you get the codes for keys to use in the navigation script?

Is there a way for the script to distinguish between, say, the "down arrow" used by itself and a command-down arrow key combination?

Posted

Look for the Code function under FileMaker Help.

You can capture if a modified key was pressed by using Get(TriggerModifierKeys), but havent tested it with the arrows.

Posted

OK, thanks for these tips. For anyone else interested, here are the codes which are returned by Code(Get(TriggerModifierKeys)):

none pressed: 48

shift: 49

option: 56

control: 52

shift-option: 57

shift-control: 53

option-control: 5000049

shift-option-control: 5100049

You can modify mr_vodka's excellent script by adding an initial If line to check whether a certain modifier key has been pressed:

Set Variable [$mk; Value:Code ( Get ( TriggerModifierKeys) )

If [$mk = 52] (or 57 or 56, etc.)

See attached file for a modified version of mr_vodka's script which looks to the control key as modifier. The file also contains a script for finding out the codes for the triggerkey and any triggermodifiers.

ArrowKeyRecordNav.fp7.zip

Posted

I am afraid you are confusing two unrelated issues and making this much more complicated than it needs to be. Get(TriggerModifierKeys) returns a numeric code representing the modifier keys that were pressed when a script trigger was activated. Each possible modifier key has a numeric value assigned to it, and the result of Get(TriggerModifierKeys) is the sum of all pressed modifier keys values. This result is NOT a character, and it makes no sense to pass it to the Code() function.

See the help on the Get(TriggerModifierKeys) function and the associated Get(ActiveModifierKeys) function, and also:

http://fmforums.com/forum/showtopic.php?tid/177234/

Posted

Thanks for your tip. But can you explain why the Code function is needed with Get(TriggerKeystroke) but not with Get(TriggerModifierKeys)?

Is it because the triggerkeystroke is passed around not as a numeric code but as something else, a "keystroke" which must be translated into a numeric value using the "code" function?

Posted

Get(TriggerKeystroke) returns a text result. You don't always need to use the Code() function to get what was typed: for example, If [ Get(TriggerKeystroke) = "a" ] should work perfectly fine. The problem is when you want your script to respond to keystrokes like Enter or Delete that produce invisible control characters. That's where the Code() function comes in handy.

Note also that Get(TriggerKeystroke) returns the resulting characters, not the keyboard strokes that were used to produce them. Get(TriggerKeystroke) will return the same result of "A" whether you pressed 'Shift+a' or just 'a' with CapsLock on. OTOH, Get(TriggerModifierKeys) responds to the actual keys being pressed, and can tell the difference.

KeyPressDemo.fp7.zip

Posted

OK. Well in that case, here's a modified version of the file I posted earlier. I've removed Code ( ) from the lines involving Get (TriggerModifierKey).

I've also added a second layout, so that you can use one layout to find out codes for various keystrokes and modifier keys, and the other one demos the navigation via control-arrow keys.

ArrowKeyRecordNav.fp7.zip

  • 1 year later...
  • Newbies
Posted

I'm in a very similar situation - new to filemaker, want to email student reports quickly without many "clicks"...So I'm curious about how you've found this thread helpful.

Posted

sbto,

Great to have you on the forum! I've learned a lot from others more experienced than me, so this is my chance to pass on some of what I've learned. But rather than add off-topic stuff to the present thread, I decided to reply in a new thread.

This topic is 5373 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.