4 Replies Latest reply on May 2, 2014 10:36 AM by FranziskaBlome

    can't search portals - what am I doing wrong?

    FranziskaBlome

      Title

      can't search portals - what am I doing wrong?

      Post

           Hi, I've been working off and on this many-to-many database, where the user can enter contacts and events and how the contacts are involved in the events, be it as a guest or some active participation, i.e. moderator. Not being a professional developer, I was proud of the progress I've made (and thanks PhilModJunk for your suggestions along the way), but I'm stuck again, my relationships seem to be working as far as adding a function for a given participant in any given event, but the portals aren't searchable - what have I overlooked?

           I'm sure the mistake is somewhere my database architecture, but I couldn't get the relationships to work at all any other way (thumbnail pic attached).

           This is what I'm trying to accomplish: In the context of CONTACTS I want to have a portal for all guests and a portal for all other participants. And reversely, in the EVENTS context, I have a portal for all invitations (i.e. guests) and one for participants (other than guests). Initially I thought I'd need a child table for PARTICIPATION and another child table for INVITATIONS, but in the edit relationships window, it wasn't possible to link each child table to both parent tables. In the end, I combined participants and guests into one child table called ROLES. I made multiple occurances of ROLES, one for just guests (field role = guest.c which I've set for "guest") and one for just participants (roles ≠ guest.c). I'm a novice with calculations and wouldn't be surprised if this calc is bad. Again, adding roles (guests or participants) to both parent tables from the child table works beautifully, the records show up in both portals, but I can only search one of the four portals, not the other three. I can't see what I did different for that one (?!?).

           Can anybody help? Thanks!

      relationship_diagram.png

        • 1. Re: can't search portals - what am I doing wrong?
          philmodjunk

               I think if we can get this part to work:

               

                    In the context of CONTACTS I want to have a portal for all guests and a portal for all other participants.

               You can probably apply the same method to your other portals.

               Put a portal to Roles on your Events layout. In portal setup... select the Filter option and enter this expression:

               Roles::Role = "guest"

               complete the portal, including any needed fields from contacts that you need as fields inside the portal row.

               This portal will now list all linked contacts that have a specified role of "guest".

               While in layout mode, duplicate this layout and use Portal Setup... from the Format menu to change the filter to be:

               Roles::Role ≠ "guest"

               and this portal will list all contacts not listed in the first portal.

          • 2. Re: can't search portals - what am I doing wrong?
            FranziskaBlome

                 O wow, I knew there was a much simpler and more elegant solution and you nailed it. It's working perfectly. Instead of having a separate layout for guests and participants, I have the two portals in different tabs all in the same layout.

                 The only slight issue I have (but the longer I think about it, perhaps it isn't an issue at all), is that when I want to search for a contact, lets say myself, in the portal under the guests tab in the EVENTS context (i.e. I want to find all events I was invited to as guest), the results include all events where I played some kind of role, as guest and otherwise. And of course it's the same on the other side, the CONTACTS context. But again, that's very minor to the issues I've had before, and may not be a problem. Thanks so much!!!

            • 3. Re: can't search portals - what am I doing wrong?
              philmodjunk

                   You could eliminate the extra "matches" if your find specifies the role as well as the name.

              • 4. Re: can't search portals - what am I doing wrong?
                FranziskaBlome

                     Yes, of course.... Thanks again, really terrific help.