Napoleon got me started in setting up a system to record judges' ratings of a variety of nominations in a contest -- every time a logged-in judge rates an entry accessed through a DataPage, it creates a new entry recording that rating in a table, recording the Building_ID, the Judge_ID and the Rating itself.
The challenge I've run into after that is how to tally the results of those votes -- that is, it's easy to display a full table for all of those ratings, but what I'd like to do is:
--Either sum or average the judges' votes per each unique Building_ID
--And, since we didn't prevent judges from voting multiple times, just pull the last vote (which may be too hard since it will be the last value matching the Judge_ID and Building_ID parameters in the table)
--And, if possible, display each judge's own rating of a submission to them while they looking through at the DataPage of entries, so they can see whether they've already rated something.
I can do the math and the display of the results for each building in JavaScript -- I just can't find a Caspio reference for setting up the query, such as \"show RATING where JUDGE_ID=1 and Building_ID=VeryTallBuilding (fieldname for this record)\".
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
jeffdillon
Napoleon got me started in setting up a system to record judges' ratings of a variety of nominations in a contest -- every time a logged-in judge rates an entry accessed through a DataPage, it creates a new entry recording that rating in a table, recording the Building_ID, the Judge_ID and the Rating itself.
The challenge I've run into after that is how to tally the results of those votes -- that is, it's easy to display a full table for all of those ratings, but what I'd like to do is:
--Either sum or average the judges' votes per each unique Building_ID
--And, since we didn't prevent judges from voting multiple times, just pull the last vote (which may be too hard since it will be the last value matching the Judge_ID and Building_ID parameters in the table)
--And, if possible, display each judge's own rating of a submission to them while they looking through at the DataPage of entries, so they can see whether they've already rated something.
I can do the math and the display of the results for each building in JavaScript -- I just can't find a Caspio reference for setting up the query, such as \"show RATING where JUDGE_ID=1 and Building_ID=VeryTallBuilding (fieldname for this record)\".
Thanks for any suggestions.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.