@jonatandor35 is there anyway i can use it in a simple way without GetAllSumVotes (). then ( z => {})
I am trying to use this value to update my database: please advise
GetAllSumVotes (). then ( z => {
**let** personPercentage = parseFloat (( NewPersonVotes * 100 ) / z ). toFixed ( 2 );
console . log ( "roham" , z , NewPersonVotes , personPercentage )
item . PercentageForPerson = personPercentage ; //updated percentage
wixData . update ( "Competition" , item );
}