2 Replies Latest reply on Mar 11, 2012 2:50 PM by shona1

    Problem with dates in Portals

    shona1

      Title

      Problem with dates in Portals

      Your post

      I have a Database for rentals. The rental Card has a portal in it "RentalLineEntry" to track the Line items rented. On the Customers layout I have another portal for related records from "Rental Line Entry" which is bringing through each line but I can not get it to read the dates correctly. At the moment I have the Date field coming directly from the "Rental Card", and it wont show any other date than the first entry even though it is picking up Data from different rentals. I have tried putting a date in the Portal on the Rental Line Entry but then the date only shows up randomly in the Customers Layout.

      My Related tables are - CustomersOrFamily, RentalCard, RentalLineEntry, RentalItems, RentalBoots.

      It seems to work fine in the "Rental Items" portal showing what was rented and when, except I cannot get it sort by date order it will only show it in the order that it was entered.

      Can you work out from this what I may have missed or do I need to upload some info.

        • 1. Re: Problem with dates in Portals
          philmodjunk

          This appears to be a message that should have been posted in the FM Pro Forum instead of the FM Server Forum (See tabs at top of this screen).

          It seems to work fine in the "Rental Items" portal showing what was rented and when, except I cannot get it sort by date order it will only show it in the order that it was entered.

          When you check the field type for this date field in Manage | Database | Fields, is the field of type text or of type date? Make sure that it is of type date. Then, in portal set up, you can specify a sort order that sorts the portal records by this date field.

          On the Customers layout I have another portal for related records from "Rental Line Entry" which is bringing through each line but I can not get it to read the dates correctly. At the moment I have the Date field coming directly from the "Rental Card", and it wont show any other date than the first entry even though it is picking up Data from different rentals.

          You appear to have these relationships:

          CustomersOrFamily----<RentalCard----<RentalLineEntry>----RentalItems

          A portal to RentalLineEntry will not be able to display data correctly from related records in RentalCard, you'll get data from the first related rental card record in every case as it evaluates from CustomersOrFamily to RentalCard, not CustomersOrFamily to RentalLineEntry to RentalCard.

          In Manage | Database | relationships, make a new table occurrence of RentalCard by clicking it and then clicking the duplicate button (2 green plus signs). You can double click the new occurrence box to get a dialog to appear where you can rename the new occurrence box.

          We have not duplicated a table. Instead, this is a new reference to the same table already present in your database.

          Add it to your relationships like this:

          CustomersOrFamily----<RentalCard----<RentalLineEntry>---RentalCard 2

          Add your date field to the portal row from RentalCard 2 to your portal row and it will correctly display the date.

          • 2. Re: Problem with dates in Portals
            shona1

            Sorry about wrong Forum, I realised aftrwards when I couldnt see my post in the FM Pro forum.

            Thanks Phil. the new table occurrence solved the problem of the dates not coming through. I will clarify my other question about sorting in the correct forum