2

Is there a way for me to display data using group by? I have product family in my product object, which I only want to display on the page.

0

There is no great way to do this in Site.com as far as I know.

Data Functions have support for sum, count, minimum, maximum, and average to allow you to get some aggregate level information, but there is nothing like GROUP by family name.

If you have a separate object to represent the family (i.e., Product Family) and have lookups to it from the product object you could store some aggregate level data on it and query that. Although there might be more work involved, this might be the cleanest approach. Here are some other possible workarounds:

  • If you have less product records than can be retrieved in a single query, query them in a custom code block, do the aggregation in JavaScript and display the results. You could create a reusable widget of it.
  • Abandon Site.com for the page and use Visualforce in a Force.com Site page and get the info with a SOQL aggregate query.
  • If you really need to push the limits, you could call an Apex REST service from your Site.com page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.