Welcome to Catalog Tips
				
			Search more than 200 articles to learn more about creating and automating your product catalogs
Tip: Start typing in the input box for immediate search results.
GROUPLAST – Identify last record in group
Overview
This Custom Field returns the value of a given field for the last record in a group.
Syntax
GROUPLAST(‘GroupPath‘,’SortField‘,’FieldValue‘)
GROUPLAST(‘Parent Category:Child Category‘,’Price‘,’Description‘)
| Element | Description | 
|---|---|
| GroupPath | Group path, delimited by colons | 
| SortField | The field to sort the records in the group by. | 
| FieldValue | The field to retrieve the value from. | 
Example
GROUPLAST(‘Parent Category:Child Category‘,’Price‘, ‘Price‘)
This command will first sort the ‘Price’ field into ascending order and return the last ‘Price’ value.
| Price | GROUPLAST | 
| 12.80 | 17.79 | 
| 15.00 | 17.79 | 
| 17.79 | 17.79 | 
GROUPLAST(‘Parent Category:Child Category‘,’Price‘,’Colour‘)
This command will first sort the ‘Price’ field into ascending ‘Price’ order and return the last associated colour.
| Price | GROUPLAST | 
| 12.80 | Yellow | 
| 15.00 | Yellow | 
| 17.79 | Yellow | 
See also
