7 Replies Latest reply on Mar 27, 2012 8:28 AM by lionking

    Display and Navigate All Records in Portal

    lionking

      Title

      Display and Navigate All Records in Portal

      Post

      Hi

      Please could someone help me ?

      I am trying to create a portal in form view that displays all my records, and as i go to the next record in my form it should highlight the related record in the portal.

      I have created this with another database software and have attached a jpg of what i am talking about...i have made sure the other software name isnt showing.

      U will see in the attached jpg, that ther is a "Next" button, which when pressed takes u to the next record in the form and to the related record in the portal.

      Please tell me if this is possible with Filemaker, and how to achieve this ?

      Thanks

      Database.jpg

        • 1. Re: Display and Navigate All Records in Portal
          johnhorner

          hi lionking,

          it is absolutely possible and i think i can offer at least one method to do it.  there are several steps (i am going to assume that each record is for a horse?):

          PORTAL:

          1. you will need to create a table for "horses".  this will generate a table occurrence (t.o.) of the same name.

          2. you will need to create a 2nd t.o. also based on the "horses" table called, for example, something like "horses_all".

          3. create a relationship between these 2 t.o.'s that uses the "x" operator and any field you like, generally i use the record serial number/id/uuid but it doesn't really matter in this case (this will relate/show all records in your portal).

          4. on your main horses layout which will be based on the "horses" t.o., you will create a portal based on the "horses_all" t.o.  all the fields you place in this portal should (generally) also be from the "horses_all" t.o.

          HIGHLIGHTING:

          1. make a button with no line or fill (a transparent button).  make it fill the portal row (or as much of the portal as you would like to highlight, but be careful it does not extend into another portal row or it will not work properly.

          2. place/stack it behind all of the fields in the portal row (send it to the back or bring the fields to the front).

          3. use conditional formatting on the button so that if the serial number/uuid of the portal row is the same as the serial number/uuid of the record currently displayed in detail on your layout is the same, it will have a colored fill of your choosing (blue, yellow, red, etc).

          4. using the same conditional formatting test, you could also apply color (or other formatting, such as bold) to the text instead of or in addition to the background highlighting (or similarly you could outline the selected portal row by selcting the appropriate line attributes).

          NAVIGATION

          1. you can navigate with buttons as you have using a script that will "go to next record", for example, but you will need to add steps to go to next portal row as well so that the portal will scroll as you go.

          2. it is probably also a useful thing also to allow the user to click on a portal row and bring up that record in detail.  this you could do simply by assigning a script step to your button which would "go to related record" using the relationship "horses_all".

          hopefully that is enough to get you started... good luck!

          • 2. Re: Display and Navigate All Records in Portal
            raybaudi

            "use conditional formatting on the rectangle"

            Are you sure ?

            • 3. Re: Display and Navigate All Records in Portal
              johnhorner

              i'm not sure that it is the best way to do it... but i know it will work... i have a similar layout and set up the conditional formatting so that i use:

              "Formula is": HORSES::__kp_Horse_UUID = horses_HORSES_All::__kp_Horse_UUID (table and field names changed to simulate lionking's situation)

              and specified a "fill color"...  (see jpeg below)

               but, please, if anyone has better methods (or any other methods) feel free to comment... my feelings won't be hurt... as long as you don't mind if i use them to improve my solution also!

              • 4. Re: Display and Navigate All Records in Portal
                raybaudi

                I didn't say that it can't be made... but that a rectangle ( or any other shapes ) can't be conditionally formatted.

                • 5. Re: Display and Navigate All Records in Portal
                  johnhorner

                  oh... sorry, right!  i didn't realize that.  and, in fact, the "rectangle" i was referring to is actually a button, and not a rectangle (and i am using it to navigate as described in step 2 of the navigation above).  i always assumed that a rectangle was simply a button which hadn't been specified yet or alternatively set to "do nothing" and that a button was just a rectangle set to do something... but it seems they are actually 2 different types of objects.  sorry for creating the confusion.  thanks for clarifying that ray!

                  so, lionking, please replace "rectangle" where it appears above in my comments with "button" and then i think it should work for you (i will edit the original post too in a moment so it does not create any addtional confusion).  note, even though you will be using a button for the highlighting, you do not necessarily need to have it perform the navigation (or anything else for that matter) as i described.  you can simply leave it set to "do nothing" if you prefer.

                  • 6. Re: Display and Navigate All Records in Portal
                    philmodjunk

                    A button, an empty field or Layout text (think spaces) could all serve as the conditional format controlled "rectangle". A container field storing a graphic can also serve, but it would not be controlled by a conditional format expression.

                    • 7. Re: Display and Navigate All Records in Portal
                      lionking

                      Thanks guys for all your replies :) I am looking forward to trying your suggestions out