Quick 30-Minute SharePoint Rating Solution (assumes SharePoint Online)
Overview (1 minute)
Add a simple star/like rating to documents or list items using built-in SharePoint features plus a short Power Automate flow and a SharePoint list column. This guide uses a “Ratings” column, Power Automate to store votes, and a calculated average field for display.
Prerequisites (one-time, 1–2 minutes)
- Site Owner permissions.
- SharePoint Online site and a target document library or list.
- Power Automate access.
Step-by-step (approximate times)
-
Create a Ratings list (5 minutes)
- Create a new custom list named “Ratings”.
- Columns:
- Title (default) — optional, can store ItemID or Document Name.
- ItemID (Number) — the ID of the rated item.
- Score (Number) — rating value (e.g., 1–5).
- RaterEmail (Single line) — optional, to avoid duplicates.
-
Add rating fields to target library/list (3 minutes)
- Go to the target library settings → Add column → Number: “RatingCount”.
- Add Number column: “RatingSum”.
- Add Calculated column: “RatingAverage” with formula =IF([RatingCount]=0,0,ROUND([RatingSum]/[RatingCount],1))
-
Create a simple rating form (5–10 minutes) Option A — List/Library column editing:
- Add a Choice column “QuickRating” (choices 1,2,3,4,5) to let users set a rating per item manually.
- Shortcoming: can’t track multiple raters or averages without automation. Option B — Power Apps custom form (recommended for UX):
- Open the list/library → Integrate → Power Apps → Customize forms.
- Add 1–5 star buttons that submit a rating value to the Ratings list via Power Automate.
- Publish form.
-
Power Automate flow to record ratings and update aggregates (8–12 minutes)
- Trigger: When an HTTP request is received OR When an item is created in Ratings (if using direct Ratings list submissions).
- Actions:
- If triggered by HTTP, parse JSON body for ItemID, Score, RaterEmail.
- (Optional) Check Ratings list for existing record by same RaterEmail and ItemID — delete or update to prevent duplicate votes.
- Create item in Ratings list (if needed).
- Get items from Ratings where ItemID = target ItemID, then calculate:
- RatingCount = length(body(‘Get_items’))
- RatingSum = sum of Score values
- Update target item in original library/list: set RatingCount, RatingSum, RatingAverage (or rely on calculated column).
- Save and test by submitting a sample rating.
-
Display and UX polish (3–5 minutes)
- Add “RatingAverage” column to default view.
- Use column formatting (JSON) to render stars based on RatingAverage (search for “star rating column formatting” snippets).
- If using Power Apps, show dynamic stars and a “Thanks” toast after submit.
-
Test and roll out (2 minutes)
- Submit 3–5 ratings from different accounts.
- Confirm counts, sums, and average update correctly.
- Share with users and add brief usage instructions.
Notes & limitations
- This is a lightweight solution for small teams. For large-scale or enterprise needs, consider third-party SharePoint rating solutions or SPFx web parts.
- Preventing duplicate votes requires capturing user identity (RaterEmail) — ensure this aligns with your privacy policy.
- Built-in SharePoint “Rating settings” exist but are deprecated/not ideal for custom UX and analytics.
Quick checklist
- Ratings list created
- RatingCount, RatingSum, RatingAverage columns added
- Power Automate flow deployed and tested
- Star display formatting or Power Apps form published
If you want, I can generate the Power Automate flow JSON or the column formatting JSON for star display.
Leave a Reply