Jump to content

Calculating active field


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

Recommended Posts

Hi all

 

I'm modifying an existing db I created and replacing buttons with key commands. I know this isn't the most effective way, but the client has asked for the db to be mainly controlled via the keyboard because of situations where use of a mouse isn't applicable and where they haven't replaced their machines with touchscreens. As a result I've had to include a "key" at the bottom of each screen detailing what key commands do what. Of course, when an active field is in use the key commands won't be effective. As a result I've created a calculation ("command status") to show the key commands for that layout or to merely state that x field is being edited. Basically the calculation changes depending on what the user is able to do. This is my calculation, however it doesn't work. Can someone assist me?

Case (

Get(ActiveFieldName) = director ; "Editing Director. Press Tab to continue or ESC to finish.";
Get(ActiveFieldName) = td ; "Editing Technical Director. Press Tab to continue or ESC to finish.";

"[A] Add Record [D] Delete Record [F] Find .. ... ...

)"

I hope you understand what I'm getting at here. I've never really done anything like this in FMP so help is greatly appreciated. I also have little experience with the Get(ActiveFieldName) function.

 

Best

Link to comment
Share on other sites

First, I think it might help to use variables. And then LOOK at the variables when the script is running, using script debugger and variable watcher.

 

Also note that you are not quoting the field names, like director instead of "director" etc.

 

 

Let( $activeField = get( activeFieldName);

 

Case(

$activeField = director ; "Editing Director. Press Tab to continue or ESC to finish.";

 

etc

Link to comment
Share on other sites

Why don't you create a custom menu with keyboard shortcuts instead, and you can include a key of those shortcuts on the layout somewhere? This gets you out of the situation conflicting with data entry.

  • Like 1
Link to comment
Share on other sites

OK, how about just detecting if ANY field is active, not a field specifically. Instead of saying "Editing Director. Press Tab..." the calculation could just result in "Press ESC to finish editing" or something of the like.

 

jbante, while your suggestion is a good one, I've already spent a while making the alterations and would prefer to see this through before implementing further changes to what I've already done.

Link to comment
Share on other sites

Why are you responding without testing?

Where is your example file?

Why should anybody respond if you just ignore suggestions and say oh, how about this?

Link to comment
Share on other sites

This topic is 2876 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
 Share

×
×
  • Create New...

Important Information

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