i have a website in wix which people submit via a form, the data from the form goes to a database collection called royaldynasty. i want that before the data enter the collection i can change it a littel, so i used the beforinsert() function, what i want to do is to take tha highest value from a coulmn called fortune in the collection called royaldynasty, and add 1 to it and return the new value to the fortune coulmn in the new user row. i tried using get or fint but i dont know sql very good so i didn't understood how to use the get() or find().
i will love if someone will show me how to write the code and explain me so in the futuer i will know to write it by myself.
thanks from advance, and sorry for the bad english :).