Simple ratings display and capture on dynamic page SOLVED

To capture and display ratings follow this Velo tutorial, this works on normal pages:

For dynamic pages few extra steps are needed.
You dynamic page is stored in one collection, ratings in another with fields as in guide, add another field type being reference with Referenced Collection to one of dynamic pages.
For dynamic page you must manually input connection in reference field. Collection must have permision for user input, anyone can view, add, update.
Next on your page create new dataset connected to ratings collection, mode is read&write, add filter in dataset settings: Field - Reference (Properties), Condition - Same as, Dataset - Properties item.
That is all. Visitors can click on rating input, it gets collected in ratings collection for that dynamic page, and as per code average is calculated and shown as well as total user input number.
So glad i did something.


Short update.
For Velo Tutorial: Capturing and Displaying Ratings to work initially you must input zero 0 in all cells. If empty first rating input is not collected.