Jump to content
Sign in to follow this  
MacD

Activate script on Return/Enter

Recommended Posts

MacD

I'm developing a solution in FM8 and currently facing a problem of making it the easiest for user to search for data.

 

What I would like to be able to do is to activate a script every time user hits Enter/Return in a field, or exists a field. I know I can implement such a feature using free EventScript plugin.

But the problem is that I need the script to be activated even if a field user exiting was NOT changed, which is not achievable with EventScript's approach as there are no calculations in case field is not changed.

 

I wonder if somebody can at least tell me if the feature I'm asking for exists/implementable using any plugin available for FM8?

 

This is the problem. And reading below this line is not required but I'll just outline why I need what I need.

---------------------

 

The problem is that I need an ability to "quicksearch" for a product by its code directly from layout and then entering product id/name into corresponding field of the current record. The quicksearch pane consists of 3 fields (high/mid/low parts of product code). When performing search, user enters data into any or all of these 3 fields, and when he leaves the last one (low part of the code), a script should be fired up to perform the quicksearch. If match is exact, product's info is entered automatically, if only partial match, a new window with matching products is shows. This means that user can enter high/mid parts only leaving low part as is (empty) - therefore no calculations/checks regarding contents of this fields will be taken in a real time (making solutions like EventScript unusable).

 

I can of course merge all 3 fields into one and ask user to enter code in a predefined way (01-001-0001), but my customers in this case are not very friendly with computers and I'd better not give them any "freestyle" input option

-----------

 

Anyways, I'll be grateful for any suggestions or ideas regarding this issue. And thanks in advance.

Share this post


Link to post
Share on other sites
SlimJim

I would suggest that a button is the answer, something like the white arrow on a green background in regular use in web browsers. It has two advantages. Firstly there is no need for an external plug-in which I believe is your only other option, secondly the user has full control over when the search takes place. So if they enter a code incorrectly they have an opportunity to go back and change it, if they have only partial data they can enter what they have and then click the button.

Share this post


Link to post
Share on other sites
gtorok

There are several plugins that allow you to activate a script using a call to an external function. If you make that function part of an auto-enter calc (replacing, always) attached to the field in question, it will function as a field exit script trigger.

 

If you have FileMaker Advanced or Developer (IIRC) it comes with an Example plugin which happens to have a script trigger function.

 

If you want to go commercial, there's SecureFM, Oazium Events, among others.

Share this post


Link to post
Share on other sites
Vaughan

"...my customers in this case are not very friendly with computers and I'd better not give them any "freestyle" input option..."

 

I find that giving users freedom in search methods while being strict in enforcing data entry standards makes for a very flexible, easy to use interface.

 

In answer to the original question, it seems to me that a typeahead scrolling portal interface would be suitable and is quite easy to do in FMP natively. None of this "event triggered script opening a new window silly knees bent mucking around" business. Keep it nice an simple.

 

I have never seen the problems associated with users being required to click a button to make something happen. Call me olde fashioned.

Share this post


Link to post
Share on other sites
MacD

Thank you all very much for the suggestions!

 

I just came to work and only had a few mins to check out the plugins gtorok suggested, but it seems I could find a use for the SecureFM's key functions remapping feature in case I do decide to go the way without using buttons. Although the price is a bit high for just button remapping, but I'll see how it goes with the client smile.gif

 

BTW, the oAzium events it not just "Events 4.0", I have tried the demo and unfortunately it doesn't fire up the script unless a field is changed before exiting it.

 

In response to SlimJim's suggestion to put a "search" button into interface, this is how it is implemented now and indeed I don't see problems with that, but my clients stuck in early 90's with their accounting system written for DOS (!!), so there's no strong concept for "mouse" in their minds and entering data using F-keys, arrows and numbers is natural for them so they want minimize switching (documents-keyboard-mouse-monitor) and I can understand them to a degree smile.gif

 

The idea of typeahead scrolling portal by Vaughan is something I never used before! Sounds interesting and if that's what I think, I could find a good use for this technique, although layout designs is all but finalized by now..

 

So I'll evaluate all the suggestions and hopefully my client will find a new approach to search panel easier to use.

 

And thanks again for all the ideas.

Share this post


Link to post
Share on other sites
SlimJim

Just a brief further comment. FM8 makes it easier to work without a mouse in a couple of ways. Firstly you can put the search button into the tab order. This then enables the use of the button without using a mouse (Tab to it and hit enter). Secondly you can create a custom menu item which runs your script and assign it a shortcut key, e.g, Ctrl-F or the equivalent on the Mac.

Share this post


Link to post
Share on other sites
MacD

[ QUOTE ]

Just a brief further comment. FM8 makes it easier to work without a mouse in a couple of ways. Firstly you can put the search button into the tab order. This then enables the use of the button without using a mouse (Tab to it and hit enter).

 

[/ QUOTE ]

 

Wow! This one is fantastic! Simple, doesn't require any changes to the code and almost no changes to layout. I think I'll go with this solution.

 

Last time I was professionally developing for FM was another country and another version of FM (5 or 6 was it?) smile.gif So much changed since then...

 

Thanks again for help!

Share this post


Link to post
Share on other sites
Vaughan

Custom menus is in FMP 8 Advanced (nee Developer) not in the regular version of FMP.

Share this post


Link to post
Share on other sites
Sign in to follow this  



×
×
  • Create New...

Important Information

Terms of Use