Jump to content
Sign in to follow this  

Scripting Find For Artists *or* Artworks

Recommended Posts

I'm revisiting a Filemaker Go solution I put together a few years ago where I implemented a clumsy workaround for a problem I couldn't figure out.  I have a database that stores ARTIST records and child ARTWORKS records, and I have a layout with a bunch of searchable fields drawn from both tables so that the user can search for, say, American (Artist field) & Watercolor (Artwork field) 

I'd like the user to be able to specify whether the Find will display a list of ARTISTS (American watercolorists) *or* ARTWORKS (Watercolors by Americans).

Currently, I have two buttons on the layout, so when the user enters his search terms, he taps the appropriate button and a script takes him to a layout with the appropriate context and results (I put a Script Parameter on the Find Artists button).  This works okay, but it is really inelegant and non-intuitive, because in Find mode the Keyboard is on display for entering the search terms, including a big blue irrisistable "GO" button that invites the user to execute the search -- which is of course not going to do what I want it to do.

Is there a way for me to use a Script Trigger that would intercept the Find action and perform my branching script instead of delivering the native Find based open the current context?  I haven't been able to figure it out -- perhaps an OnModeExit? I've gotten kind of confused about what happens to the search result and when a script might intervene.

An alternative is I suppose I could just give the user a choice of two layouts to go to depending on whether he wants to search for Artworks or Artists -- adding a step to the search process.



Share this post

Link to post
Share on other sites

Can you add a radio button as part of the search that does this specification? Then you can branch based on its value...

Share this post

Link to post
Share on other sites

Webko -- thanks for the suggestion. THat seems likethe kind of thing I want to do - - but I'm hazy on the mechanics.  How do I trigger he script to run?  The user fills in the search field, including a radio button, then taps "Go" and filmmaker runs the Find on the current context .  . .  . I assume I'd attach a script to a Script trigger on the layout so that after the Find executes, this additional thing happens.  But I'm unclear on what trigger to use (Record load?  Mode exit?  Mode Enter?). . . or whether I'm not even thinking the right approach her?  I may be missing something obvious!

Share this post

Link to post
Share on other sites

Add the script to the button object - no need for a trigger

I would make the radio button a global text field - Artists_Works_g perhaps

Then the script called when pressing the button uses an if based on the value of the field to perform to go to the correct layout and perform the correct search

Share this post

Link to post
Share on other sites

Ack -- I'm either not getting my situation across or just missing the obvious -- the "Button" is on the slide-up keyboard on the iPad -- is it possible to attach a script to a button that is not on the FIlemaker layout, but on the built-in iPad keyboard that appears when you type in any app?  As far as I'm aware the 'Go' button just executes the search?  Here's a picture of the screen -- you can see the buttons I set up and how they are 'upstaged' by the ipad-native 'Go!' button.  


Edited by Wickerman

Share this post

Link to post
Share on other sites

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
Sign in to follow this  

  • Similar Content

    • By cat traveller
      Hi everyone,
      on a file accessed via filemaker Go 17, I am using a scripted navigation to move records up and down in a portal that is inside a popover.
      This has worked in filemaker 12 like a charm and also works on a filemaker client. The records smoothly move up and down the list. 
      However in Filemaker Go, the portal follows every move of the script as if it is not aware of the freeze portal.
      EG the down button is to move the record one record further down inside the filtered and sorted portal (like so)
      This is the script.

      - freeze window and go to portal
      - go to first line of portal and loop through the portal until I hit the record to move
      - go to next line and give the position field the value of my record to be moved
      - go to line above and give the position field the value of my record +1
      - commit record and refresh portal via an x join 
      - go to last line of the portal 
      - go to the line of position of my record to be moved. 
      Would anyone be aware of this issue or know a workaround to stop the portal from flickering?
      Thanks so much
    • By Greg Hains
      Good afternoon,
      I am trying to understand a problem I am experiencing with an FmGo solution.  The solution is hosted on FM Cloud (AWS) and runs well on my Mac workstation, but experiences a few issues when running on the iPad.
      I'm also experiencing the same problem when I host it from a local Windows Server 2012 box.
      Using RESTful APIs (with BaseElements plugin) on my Mac workstation and I am downloading product data from a host, manipulating the data, then uploading it back to the host.
      I am assuming that I need to have the BE plugin running on the AWS host before FmGo can use the functions within. As no FM solution runs on the host itself (to Install Plugin), how do I install this plugin to the FMS there? (Assuming that this problem is related to plugins on FmGo). 
      Also, without ScriptDebugging on the iPad, I have a ton of Show Custom Dialogs all over the shop trying to see where it goes wrong on the iPad. Some of the REST calls fail with authentication errors on the iPad but work fine on the desktop. Same script. Got me beat!  I'm thinking it may be one and the same problem.
      Any help is appreciated.
    • By adyf
      I've just upgraded to Filemaker Pro 17 and Filemaker Go 17. Unfortunately I now get 'The Host's Capacity Was Exceeded' error message (attached) when trying to open a file on my iPad that is hosted on my MacBook. I'm the only user of this file, so it seems strange and I've never had the error with previous Filemaker versions. Has anyone any ideas please?
      Edited to add that the file opens with Filemaker Go 17 when it is open on the MacBook with Filemaker Pro 16, therefore could this be a bug in Filemaker Pro 17?

    • By Arnold Hooton
      I’m trying to retrieve a street address after I’ve used the ‘location’ function to access the gps coordinates. This may be simple but all I’m stumped. Maybe there’s a beginners tutorial on how to use url’s To get what I need. 
    • By VirtualBob
      I'm using FileMaker 12 but want to get a version that syncs via free iCloud or Dropbox type service (you can only do it manually in FM12). What is the earliest version that does this? Its for personal use and I don't have much money so I just want to get a cheap older version of FM but want it to sync across all my devices.

Important Information

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