DannA 0 Posted May 23, 2020 Share Posted May 23, 2020 Hi All, wow, it's been awhile since I was last here ! I am playing around with FM18 to see what's new since the days of FM7 and discovered "Google style searches" with a global field and a portal that shows "filtered" results as I type - all good. Is there a way do do the same thing BUT to use it instead of a drop-down list ? I have a WorkOrder table with a clientID field that links to a Clients table to get the client info for that work order. What seems like the simple way to get the info is : a drop-down list showing all records from Client using a value list. What I would like is to replace the drop-down by the result of a google type search so that as I type characters my choices are filtered and I select the desire record with a click. The 1st problem I am having is that my layout is based on the WorkOrder table and the client info is in the Client table. Is there a way to do a google style search without changing layout ? The scripting bits I found here and there as well as video examples all seem to search from the current table - I am not trying to filter down to find the correct Work Order - I am trying to filter down the clients table to select the one I want to associate to this current WorkOrder record. My 2nd problem, does anyone have thoughts on how to show/hide the portal that is needed for that style of search field ?? I was thinking of a slide control or tab control placed just under the search field and then showing it when the field is entered and hiding it when the user selects the chosen record -- clicking on it -- hides the tab or slide and puts the clientID in the proper field on the WorkOrder layout. Thanks for the help. Dan Link to post Share on other sites
bcooney 143 Posted May 25, 2020 Share Posted May 25, 2020 Here's a quick and dirty example of a card picker.CardPicker.fmp12.zip Link to post Share on other sites
DannA 0 Posted May 25, 2020 Author Share Posted May 25, 2020 Thanks. I will look at it tonight. Link to post Share on other sites
DannA 0 Posted May 25, 2020 Author Share Posted May 25, 2020 Thank you for this, it seems promising. One question because I have never used card style windows.... What does the Install OnTimer Script do in relation to the revealing the card and dealing whit what was selected by the user ? Without those OnTimer steps my FM18 freeze and the screen is dimmed but no window appears on top of the main window. Thanks, Dan Link to post Share on other sites
bcooney 143 Posted May 25, 2020 Share Posted May 25, 2020 The onTimer is a key part of the technique. Once the window closes, the handler script takes over. Card windows are a wonderful way to present another context to a user without the need to build a relationship. Link to post Share on other sites
bcooney 143 Posted May 26, 2020 Share Posted May 26, 2020 Another approach is to create work orders from a client context. This pattern, set $id clientprimarykey go to work order new record set work order::clientid $id Commit record Link to post Share on other sites
DannA 0 Posted May 26, 2020 Author Share Posted May 26, 2020 Thanks, that is what I had originally. After speaking with the folks I am trying to help, I realized that they use the work order almost like an appointment scheduler. I am trying to avoid having them to adapt to different steps (workflow) so the transition is as smooth as possible for them. Link to post Share on other sites
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now