tmas73 Posted March 11, 2009 Posted March 11, 2009 Show latest date in field. I have a portal row that displays products with date of purchase, on my main layout I would like to have a field that displays the latest date of the purchased product. How can that be done? Thanks
bcooney Posted March 11, 2009 Posted March 11, 2009 If you sort the relationship by dateofpurchase desc., then the parent will see the first child record which will be the most recent purchase. This is the most accurate way, since the last created record may not be the most recent purchase.
tmas73 Posted March 11, 2009 Author Posted March 11, 2009 (edited) Sorry it was not to clear. I have a field in my layout and a portal. In the portal all the date entries are displayed, but in the field it should just show the latest date info from the portal record. Edited March 11, 2009 by Guest
RalphL Posted March 12, 2009 Posted March 12, 2009 Use the Max Function with the same relationship as the portal.
RalphL Posted March 12, 2009 Posted March 12, 2009 It is one of the Aggregate functions. From FMP Help: "Returns the highest valid value in: a repeating field (repeatingField). a field in matching related records specified by (table::field), whether or not these records appear in a portal. several non-repeating fields in a record (field1;field2;field3...). corresponding repetitions of repeating fields in a record (repeatingField1;repeatingField2;repeatingField3), if the result is returned in a repeating field with at least the same number of repeats. several fields in the first matching record specified by (table::field1;table::field2;...). You can include fields from different tables (table 1::field A;table 2::field B...)."
Recommended Posts
This topic is 5735 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now