Skip navigation
    1 Reply Latest reply on Jul 5, 2010 9:02 AM by philmodjunk

    Three Part Search Problems

    RichAbbott

      Title

      Three Part Search Problems

      Post

      I am fairly new to filemaker and have run into a few problems. On  my main layout page I have created a self referencing portal that  contains the following fields in order:

      Date
      Machine I'D
      Staff
      Client
      Address
      Foreman details
      Start time
      End time
      Truck used
      Attachments
      Materials
      Comments
      P.o.*
      Job type

      I am using the portal, because I was meant to believe that is the only  way to have a list where the user can keep adding lines of information.  *It is unknown as to how many lines will be needed for each day. *On  another layout I have set up the same fields as a means of entering new  records for the main page. This is where I have start to run into a few  problems. As the post heading suggests, there are three issues I need  help with. I will separate them into parts to make it easier to follow.*

      Part one
      Search records
      The main page is set up as a way to view the activities for a date. When  the user clicks a button, it takes them to the second layout (Add  details page). Again this has all the same fields as the main page. When  the user enters all the info and clicks the ok button, I want it to  search all previous records, find the date they have entered, and if it  exists, and the information on the next line of the portal. If it  doesn't exist, create a new record with the information. Right now it is  creating a new record for everything, even ones with the same date. Can  some one suggest a script to help with this?

      Part two
      Search on main page
      The primary users of this database will have very basic computer  knowledge, and I know that they won't understand the find function and  just try to enter a date on the drop down calendar, thus messing up all  the records. I know I can set up the OnObjectExit script trigger on the  date field, but I am not sure of the script to use so that when some  picks a date from that field, it automatically finds the record  associated with that date and lists all relevant info in the appropriate  fields.*

      Part three
      Copy or move portal line
      As I mentioned earlier, the above fields are located in a portal on the  main page. I have buttons on each line that when clicked, take the user  to the Add Details page. Sometimes it is necessary to move one of the  lines to another date (I.e. A client has changed the date of when a  machine is needed). Rather than delete the whole line and retype  everything, I would like to have two buttons of the Add Details page,  one marked 'copy' one marked 'move'. Obviously the copy button copies  the selected info to another *date record and the move one moves  everything to the new date and clears the information on that line from  the old date. I am not sure what the best way to do this is. Maybe have a  window pop up asking for the date to be copied or moved to.*

      Any help you can provided on all of the above problems, would be most  appreciated.
      Sincerely,
      Rockhopper

        • 1. Re: Three Part Search Problems
          philmodjunk

          Before we tackle all your questions, it will help to nail down some basic design questions...

          How have you set up your "self referencing portal"? In otherwords what fields are linked in your relationship for this portal?

          "I was meant to believe that is the only way to have a list where the user can keep adding lines of information."
          Well, that's not the case. It is true that with the right relationship options, you can add a new record, which may or may not be a new line, simply by typing information in the bottom blank row of the portal. You can also easily add new records through other means--such as simply pressing ctrl-N (windows) to start a new record and you can also put a button on your layout for this.

          What's not really clear to me is how you really want that main layout to work for you. What fields do you show in your portal on that layout and what fields do you show outside that portal? I suspect that you want to see all the jobs for a given date and if so, I'd recommend you define a second table to provide one record for each day that links to the above described table of "job" records. In that case, "moving" a record could be a simple as updating a date field used to link your job records to this new table of work day records.

          More Like This