1 2 Previous Next 15 Replies Latest reply on Jun 14, 2011 11:11 AM by philmodjunk

    Portal... HELP - Newbie

    MikeB-vs-FileMaker

      Title

      Portal... HELP - Newbie

      Post

      Hello all,

      Thanks in advance for any input.

      I am trying to implement the following functionality

         -Highlight portal row on MouseOver w/ wpecified color

         -Highlight portal row on Selection (Click) w/ specified color

         -Change label data on Selection of a Portal Row (Click)

      The "AttachedContactsList" is a join table and the actual contact data I want to pull for the labels is in the Contacts table.

      Please see the attached image.

      Thanks,

      Mike

      portal.jpg

        • 1. Re: Portal... HELP - Newbie
          philmodjunk

          -Highlight portal row on MouseOver w/ wpecified color

          Can't be done in current versions of FileMaker. There is no way to detect the MouseOver event. (The only "MouseOver" thing you can do in FileMaker is to pop up a tool tip.)

          -Highlight portal row on Selection (Click) w/ specified color

          You can do this using conditional formatting in many cases depending on what you are clicking. If your click enter's a field that needs to be editable in this portal, then the color change may be difficult to do. If the portal is for display purposes, you can set up all the objects in the portal row as a button. When clicked, a script set's a global variable and all the objects in your portal row or a single object located behind all of them and sized to fill the portal row can use the value of this variable in a conditional format expression to change the fill color and thus produce the desired color change.

          -Change label data on Selection of a Portal Row (Click)

          Can you give us an exmple of what kind of "change" you need to see. Chances are that this can be done with a script, but the details can vary a lot depending on exactly what you want to do.

          • 2. Re: Portal... HELP - Newbie
            MikeB-vs-FileMaker

            -Change label data on Selection of a Portal Row (Click)

            Can you give us an exmple of what kind of "change" you need to see.  Chances are that this can be done with a script, but the details can  vary a lot depending on exactly what you want to do.

            In the top portion of the attached image you will see on the left my set of labels and on the right my portal.  Upon clicking a portal row which designates a contact that is attached to that particular claim.  I want to update the labels on the left with the appropriate contact information from my contacts table.

            Also without loading up a separate layout for the AttachedContacts table in a new window and creating a new record to attach a contact, is there a way I can attach a contact using the green plus/add icon button from within the Claims layout by using a drop down list  in the "Contact Name" field in the portal.  After attaching a contact, I would want that field to be locked, no dropdown (as that record now exists and should not be editable only removable in the event of deleting a portabl row), and probably remove the green plus/add icon so as not to have it in front of every attached contact record which would be useless.

            • 3. Re: Portal... HELP - Newbie
              philmodjunk

              Let's start with one thing at a time. Some of the latter requests may not be possible to do exactly like you describe, though something workable can probably be worked out.

              This appears to be a layout based on the Claims table occurrence.

              You'd need an additional relationship between claims and Contacts.

              Select your contacts table occurrence (A tble occurrence is a box in your relationships graph) and click the button with two green plus signs to make a copy of it. DoubleClick the new occurrence to change its name from Contacts 2 to SelectedContact.

              Define a global field, gSelectedContactID in the Claims table.

              Now link in the new table occurrence using this new field to get:

              Claims::gSelectedContactID = SelectedContact::ContactID

              Now, create this script:

              Set Field [Claims::gSelectedContactID ; AttachedContactsList::_fkContactID]

              Now, while in layout mode, right click your portal, select Script Triggers from the menu that appears and use the OnObjectEnter trigger to perform this script.

              You can also use Claims::gSelectedContactID = AttachedContactsList::_fkContactID to specify a contrasting fill color for each field in the portal and you'll see the portal row of your currently active row change color each time you enter a different portal row.

              • 4. Re: Portal... HELP - Newbie
                MikeB-vs-FileMaker

                Ok, I did all of that, but am not sure what I accomplished.  Seems to be functioning the same as before.

                I have the new gSelectedContactID which displays the _fkContactID but how can I use this to accomplish my objectives?

                • 5. Re: Portal... HELP - Newbie
                  philmodjunk

                  Ok, left out the last step. Add fields from SelectedContact to your layout to display the "label" information you want. When you enter a field in the portal, the script trigger will update gSelectedContactID and these fields will then display data from the selected contact.

                  • 6. Re: Portal... HELP - Newbie
                    MikeB-vs-FileMaker

                    Do I have to use fields or can I dynamically update label text?

                    • 7. Re: Portal... HELP - Newbie
                      MikeB-vs-FileMaker

                      The reason is because I dont want the field to even be selectable on the layout.

                      It keeps giving me the following message:

                      This action cannot be performed because this field is not modifiable.

                      Which is fine but I would rather the user not even have the option of trying to edit the field.

                      • 8. Re: Portal... HELP - Newbie
                        philmodjunk

                        Use the fields, you can't dynamically update the label text. You could use global variables inside a merge text block, but that would be a more complicated way of getting the same results.

                        • 9. Re: Portal... HELP - Newbie
                          MikeB-vs-FileMaker

                          Nevermind I turned off Field-Entry in browse mode.  Is this correct? or should I be using labels?

                          • 10. Re: Portal... HELP - Newbie
                            MikeB-vs-FileMaker

                            Wow the row highlighting is working by default or is that part of something we did here?

                            • 11. Re: Portal... HELP - Newbie
                              philmodjunk

                              Did you set up a conditional format like I suggested? If so that's what's doing it. Otherwise, the appearance of the active portal row can change in some ways, so that may be what you are seeing here.

                              • 12. Re: Portal... HELP - Newbie
                                MikeB-vs-FileMaker

                                I am playing around with the condiitional formatting per your instructions but having a little trouble.

                                Currently there is no conditional formatting set on any of the fields and when I click a row it is highlighting in black and updating the data.

                                • 13. Re: Portal... HELP - Newbie
                                  philmodjunk

                                  The black highlight is a function of the Portal's built in behavior not a conditional format. If I click outside a field in the portal but inside the portal row, the row will highlight in this fashion. In the test file where I tested my earlier suggestion, I don't see the portal row highlight in this fashion if I click into a field in the row. That's an important distinction as the next step is to set up a drop down list here you can select a contact to add a link to that contact record in this portal's table.

                                  • 14. Re: Portal... HELP - Newbie
                                    MikeB-vs-FileMaker

                                    Ok I see what is happening.  I turned off field entry in all layouts on the fields in my portal row and the highlight works exactly the way I want it to (except its black).  If we are going to change one of the fields to a drop down it does not work in this fashion anymore.

                                    1 2 Previous Next