Hello,
I have a repeating group I would like to sort by one of the data type (Company)'s fields (Compayn-Review), which is another field (Star Value | number) of another data type(Company-Review). In the repeating group, I select,
- Type of content = Company
- Data source = Do a search for Companys
In here I add a constraint by an input field.
Then in the sort by section, I have limited options which seem to only include text and image options.
Any help would be greatly appreicated
Its apparently not possible to sort for nested attributes.
One hack many are suggesting is to use the nested attribute as Data Type for the Repeating Group and then populate the Cells with all Companies that have Current cell’s attribute in their nested Data field.
Another one is to just store the value (or value change) of the nested Object at creation of the Object in the parent (i.e. When Company-Review gets added, write new Review avg of company to another Field ‘avg-rating’ as a number.
@florianherzog Thanks for your help. I couldn’t get the first solution working.
I’m trying the second now. I tried creating a new workflow for when the review is created. I set the work flow to:
Thing to change: Current row’s User-company-reviews’s Company
Field: starzvalue (I created this field on the Company data type just for this workflow) = The Company’s User-Company-Reviews:each item’s Star Rating Value: average.
When I create new reviews with this workflow the starzvalue field never updates past 0.
That said, sorting the repeating group with type of content as company is able to be sorted by starzvalue. So once I figure out what’s going on with the data getting into the DB, I think this will work!