6 Replies Latest reply on Apr 2, 2012 2:11 PM by eldoonmad

    Question about using portals

    eldoonmad

      Title

      Question about using portals

      Post

      I am still fairly new to FileMaker Pro and am still trying to understand relationships. I do not expect anyone to take the time to realy explain it to me but I would like help settting up a portal. 

      Basically my setup is like this. I am creating an inventory management database to, well of course, keep track of my inventory and assets. One of my tables is called "Assets" and all the feilds describe the assets. I have another table called "Warranties". This one is for keeping track of warranty tickets for an Asset that is out for repair. In form view of the "Assets" tables, I have a tab that is called "Warranty History". I would like all the lines from the "Warranties" table that are associated with the "Assets" indexed, autoserial numbered feild to be listed under the "Warranty History" tab. From what I understand this can be done using a portal. I have created the portal but I can not get any information to populate in it. I know it has to do with relationships, so if anyone can help me with that, I would greatly appreciate it. 

      Screen_Shot_2012-04-02_at_12.15.20_PM.png

        • 1. Re: Question about using portals
          eldoonmad

          This is the Asset form view

          • 2. Re: Question about using portals
            eldoonmad

            This is the Warranty History form view

            • 3. Re: Question about using portals
              philmodjunk

              First, double click the line linking asset to warrantyHistory and select the "allow creation of records via this relationship" option. Enabling this option should allow you to create new records in the portal by entering data into the uppermost blank row in the portal. See if that works for you.

              • 4. Re: Question about using portals
                eldoonmad

                Actually I don't think you understood correctly. I didn't want to be able to create records from the portal, just view a history of records. I actually figured it out, I found the right fields that needed a relationship to one another. However, the next part I am having issues with. I have a button as you can see in the image above to "create ticket". This button is a script that:

                1) Takes me to the "Warranty History" table

                2) Creates a new record

                Next what I want it to do is auto fill some of the information, such as the serial number, site name and any info that is already preasent in the "Asset" table. What would be the appropriate way to go about doing that?

                • 5. Re: Question about using portals
                  philmodjunk

                  What I suggested was a test to see if all details required for this to work were in place.

                  Your screen shot showed a pair of match fields that should have worked for your relationship provided they received the needed values--which was part of what the above suggestion was intended to test.

                  For your question, I can only assume that you still have this relationship: If you've changed this as your last post implies, you'll need to describe those changes in order to adjust the following script to fit that change.

                  Asset::__pkAssetID = WarrantyHistory::_fkAssetID

                  1) your script can be:

                  Set Variable [$AssetID ; value: Asset::__pkAssetID]
                  Go to Layout [WarrantyHistory]
                  New Record/Request
                  Set Field [WarrantyHistory::_fkAssetID ; $AssetID ]

                  Next what I want it to do is auto fill some of the information, such as the serial number, site name and any info that is already preasent in the "Asset" table.

                  Don't do that. Instead, delete these fields from WarrantyHitory as you do not need them unless it is data that may change in the Asset record and you want to preserve a copy of data current at the time the record was created--I don't think that's the case here. Instead, just add these fields from the Asset table to your WarrantyHistory layout and they'll display the data as currently entered in the related Asset table.

                  • 6. Re: Question about using portals
                    eldoonmad

                    Thank you, I did make some changes but I did just as you said and it works perfectly. Thank you