Comparing fields in two collections

Hello,

I am looking to pull a value out of one collection, and compare it to another value from a separate collection. I am hoping that I can validate a user’s prediction of a number(that goes into collection 1), and they receive points for how accurate they are to the correct number (which is stored in collection 2). The following rules apply:

  • if number from collection 1 matches the exact number from collection 2, user receives 35 points (which would input into a third collection)
  • if number from collection 1 is 1 < x < 5 from number in collection 2, user receives 30 points (which would input into a third collection)

I am not that experienced in coding, but any assistance would be appreciated!

bumping. if anyone has any suggestions, please let me know!

Your PULL value out of a collection, here we call it Query. Wix offer a own API for doing that.
https://www.wix.com/corvid/reference/wix-data.html#query

Just read a little bit about Database and how you work with them. It’s the top of the BASIC.
https://www.wix.com/corvid/all-documentation