2 Replies Latest reply on Nov 2, 2011 3:54 PM by boydcrow

    Trying to create a simple form where selecting from pop-menu displays matching record

    boydcrow

      Title

      Trying to create a simple form where selecting from pop-menu displays matching record

      Post

      It's more than a little frustrating because I know how to do this in Access but I have been halfway through "The Missing Manual" and can't figure this out.

      I have a table of users.  I have a form with all the fields from that table.  I want to create a field with a pop-up menu listing my twenty users.  When I click on the desired user, I want the form to display the record matching that user.  

      I tried making a separate named field "DropDownUsers" and having it display the list of users.  Then, I made a button which performed a find but I can't figure out how to get the data from "DropDownUsers" into the "Users" field selected for the find.  There must be a way to tell the find to look in Field A for records matchign Field B.  

      Please advise.

        • 1. Re: Trying to create a simple form where selecting from pop-menu displays matching record
          philmodjunk

          Open manage | Database | fields

          Find DropDownUSers and double click it to bring up field options.

          Click the storage tab and specify global storage.

          This makes any value entered in this field accessible when the script enters find mode and you set up your find request.

          Don't know if you've set this up to select a USer by ID number or name. The process is the same, but the field you specify for entering search criteria is different. I'll assume a name for now, but you should be able to use an ID number instead with one small change to this script:

          Enter Find Mode [] //clear the pause check box
          Set Field [USers::UserName ; Users::DropDownUsers ]
          Set Error capture [on]
          Perform Find []

          • 2. Re: Trying to create a simple form where selecting from pop-menu displays matching record
            boydcrow

            Thanks.  That did the trick.  I was afraid I would end up in Find Mode but found myself in Browse.

            I have to say it to took me fifteen minutes to figure out the Set Field GUI.  it is not at all intuitive that "Calculated Result" should be the source field with no operators.  Results are normally targets rather than sources.  The Help on Set Field does not addresss the GUI.  It doesn't even say what the "Specify target field" checkbox is supposed to do.

            Anyway, I'm back on track for my "total immersion" FileMaker Pro language learning.