Hello. if anyone can solve this problem for me i would be extremely great full. i have been trying for 24 hours now. i need my ratings input to work inside my repeater so i can rate different profiles individually. i have attached a photo with my problem. and i have typed my code below for anyone to have a look. thank you to anyone who can help me with this issue.
![](https://static.wixstatic.com/media/a27d24_1f513d069b1f46889f8c109a269a2072~mv2.jpg/v1/fill/w_826,h_562,al_c,q_85,enc_auto/a27d24_1f513d069b1f46889f8c109a269a2072~mv2.jpg)
export function ratingsInput1_change(event) { $w("#dataset1").onReady(() => { // get the current item from the dataset const currentItem = $w("#dataset1").getCurrentItem(); // get the current average rating, number of ratings, and //total ratings for the current dataset item const average = currentItem.avg; const count = currentItem.numRatings; const total = currentItem.totalRatings; // get the new rating from the ratings input const newRating = $w('#ratingsInput1').value; // calculate the new average rating based on the current //average and count const newAverageLong = (total + newRating) / (count +1); // Round the average rating to 1 decimal point const newAverageShort = Number.parseFloat(newAverageLong).toFixed(1); // set the dataset fields to the new average, total // ratings, and number of ratings $w('#dataset1').setFieldValues({ 'avg': newAverageShort, 'totalRatings': total + newRating, 'numRatings': (count + 1) }); // save the dataset fields to the collection $w('#dataset1').save() .catch((err) => { console.log('could not save new rating'); }); }); }
Thank you for any help
You doing this tutorial
https://support.wix.com/en/article/corvid-tutorial-capturing-and-displaying-ratings
Have a read of this page here from Yisrael.
https://www.wix.com/corvid/forum/corvid-tips-and-updates/example-input-repeaters
Also, have a read of the Repeater API.
https://www.wix.com/corvid/reference/$w.Repeater.html