6 Replies Latest reply on Jun 27, 2014 7:01 AM by philmodjunk

    How to Display Latest Date From Another Layout

    bkeenfm41

      Title

      How to Display Latest Date From Another Layout

      Post

           I am working on a "Dashboard Layout" that will display the latest field from another layout. For example, "Results Layout" has transactions regarding numerous batches. The "Results Layout" screen reflects batch_id, date, results, etc. I would like to display the latest date and results for a related batch on the "Dashboard Layout. I have tried several ways to display such information, but I have not been successful. I appreciate any suggestions or comments.

        • 1. Re: How to Display Latest Date From Another Layout
          philmodjunk

               It would appear you want to display data from another table in your database. The fact that you have another layout for this table is not a factor in that.

               

                    I would like to display the latest date and results for a related batch on the "Dashboard Layout.

               And how would they be related?

               Can there be multiple related batches in the same day and thus have the same date?

               Is Batch ID an auto-entered serial number field in a field of type number?

               If you have no more than one related Batch record with a given date, you can specify a sort order for the relationship that sorts the related records in descending order by the date field and then you can place fields from a related Table Occurrence of Batch on your Dashboard layout.

               OR

               you can put a one row portal to Batch on your Dashboard layout and use portal setup to sort the portal by date in descending order.

               If you might have more than one related Batch record with the same date, but your BatchID field is an auto-entered serial number field, either of the above options can be set up to sort by the Batch ID in descending order instead of the date.

               Another option if you have multiple related batches with the same date would be to use a timestamp field instead of a date in order to record both the date and the time.

          • 2. Re: How to Display Latest Date From Another Layout
            bkeenfm41

                 Thanks! Your comments are very helpful. I did not think about portal. There would be multiple related batches on the same day with same date. The Batch_ID is an auto-entered serial number field in a number type field. I have a 'Sequence" field that is also an auto-entered serial number field in number type field.

                  

            • 3. Re: How to Display Latest Date From Another Layout
              bkeenfm41

                   I tried the portal option mentioned in the above post and it works as long as there is only related record in the second file. When I have multiple related records with different dates, the oldest record is shown in the portal. I sorted the date and BatchID on a descending basis. I appreciate any comments or suggestions.

                    

              • 4. Re: How to Display Latest Date From Another Layout
                philmodjunk

                     You need a descending sort order, not an ascending sort order. That way the most recent, rather than the oldest, records will appear in your portal.

                • 5. Re: How to Display Latest Date From Another Layout
                  bkeenfm41

                       I sorted on a descending basis. Do I need to designate which row of the portal to display?

                  • 6. Re: How to Display Latest Date From Another Layout
                    philmodjunk

                         Sorry for missing that sentence. Why do you sort on Batch ID AND by date?

                         If BatchID is an auto-entered serial number, then you should only need to sort your portal or the relationship in descending order by BatchID.

                         Or is it that you want to FILTER the portal so that only the records from the newest batch are visible in the portal?