2 Replies Latest reply on Aug 2, 2010 2:04 PM by yandg

    Portal to show data from current file.

    yandg

      Title

      Portal to show data from current file.

      Post

      Hi, Dont know if this is possible but .........

      I Have a client table with a portal linked to another file (eg service).  This portal works fine in showing all the 'jobs' we have completed for that  particular client.

      It would be nice to have this 'History' data showing on the 'service' file aswell.

      So the service file needs to show in the portal all other records for that client (as well as the current one)

      This would make getting info for a particular job easier than having to switch to a list layout or switching screens altogether. We often need to input data from a previous job into the current job to allow for recalls or same fault problems.

      Cant seem to get the portal looking at 'itself'.. if this is possible ?

      Many thanks

      Mike

       

        • 1. Re: Portal to show data from current file.
          FentonJones

          This is done with a self-relationship; which is almost the same as a plain relationship, but is between two table occurrences (TO) of the same base table. In your case you would have 2 TOs of the Services table, the existing one and another. Duplicate the main one to get it; name it appropriately; I like to use the term "_self" then the field. The last part of the TO name would look like this:

          Services_self~ClientID

          The relationship is, as you can see, between the ClientID in Services, effectively letting you put a portal in the main Services table's layout to show the multiple services records for that client (including the one you're on).

          I would actually add one more line to the relationship. Assuming you have a unique auto-enter serial ID in Services,* it would be:

          ServiceID ≠ ServiceID  (that's "does not equal)

          This would remove the current Service record from the portal, just show the others. I'd rename the relationship to:

          Services_self~ClientID_not_me

          You may want both relationships, if you need the full self-relationship for other things.

          • 2. Re: Portal to show data from current file.
            yandg

            Many thanks, got it.

            Didnt realise to add another occurence to link to.

            and yes i can use service_id to stop the current record being listed.

             

            Brilliant

             

            many thanks

            Mike