Thanks @NigelG. Data model really helps,
I forged ahead before seeing this and have reporting almost working without using API Workflows. Just can’t figure out how to stack rank results in a repeating group by a cell value that is different than the content type of the table. Details of data model and wf below:
Feature - text metadata like benefit, description, etc.
Segment - eg cars, clothes, etc.
Question - text, etc. Canonical set so each user gets presented w/ same Q’s based on survey’s subject
Segment
List of Features
Rating - create a rating synchronously when user answers Question
Question
List of Features - populate by looking up Question’s List of Features
Score - apply same score to each Feature in the List of Features for now
As long as I create a Rating as user moves along, I can immediately display results in a RptgGroup. Report needs to have one Feature per row, with average of all Ratings. I can do this by creating an RG w/ content type Feature, first cell looks like this:
Feature Name - do a search for all Features for the survey’s given Segment
Avg Score - construct via calculation: sum / count of all Rating’s Scores for current cell’s Feature
Works beautifully, The problem is I can’t sort the table by the Avg Score element in the first cell b/c RptgGroup content type is Feature (needs to be, so I can have one row per Feature). So, no stack ranking, which is primary value prop.
The only option I can think of is to have a new data type/junction table:
Feature Rating
Feature
Rating
But to do this I have to run an API workflow on the list of Ratings, AFTER all Q’s are answered, so user sits and waits for results. As mentioned, this takes 4-5 minutes (each Segment has ~100 features, each survey has 15 questions, each of which generates a Rating tied to a dozen or so Features).
Any ideas how to use calculations in a clever way to get a per Feature average score into the report table w/o using API workflow to create Feature Ratings and building the table off that new data type? Alternatively, any tricks for sorting the table by a cell element’s value rather than by criteria of the Content Type?