bggann
Active Member
I'm trying to use a custom calculation on a field to show just the 1st or last record value in a grouped list display.
It doesn't matter if it is first or last, because all the values in that group are the same.
The reason is I want the "calculations" line to have the value of these fields along with the "Sum" values from other fields. I'm showing just the "calculations" line from each group in a custom template.
I realize I can use %s to get the 'value' of the field in a custom query, but it appears to return just the first record value for all groups. I tried to build a query to return the value based on the grouped by element, but could not get past sql errors.
To reiterate:
- I have a repeated group in a list.
- I display that list 'grouped by' one of the fields (elements) in the group.
- All the numeric values are totaled using the SUM calculation.
- There are 4 elements (text fields and one date) that are the same for all records in the group.
- I want to display them on the Calculations line in the list by adding a Custom Calc that returns the 1st (or really) any value in the group.
- If I just use %s in the custom calculation - I get the value from the first record of the list, not the first record from the group.
Ideas?
It doesn't matter if it is first or last, because all the values in that group are the same.
The reason is I want the "calculations" line to have the value of these fields along with the "Sum" values from other fields. I'm showing just the "calculations" line from each group in a custom template.
I realize I can use %s to get the 'value' of the field in a custom query, but it appears to return just the first record value for all groups. I tried to build a query to return the value based on the grouped by element, but could not get past sql errors.
To reiterate:
- I have a repeated group in a list.
- I display that list 'grouped by' one of the fields (elements) in the group.
- All the numeric values are totaled using the SUM calculation.
- There are 4 elements (text fields and one date) that are the same for all records in the group.
- I want to display them on the Calculations line in the list by adding a Custom Calc that returns the 1st (or really) any value in the group.
- If I just use %s in the custom calculation - I get the value from the first record of the list, not the first record from the group.
Ideas?