Random sort Add-on decorators
Options
Andrew -1831384
Member ✭
I'm trying to random sort a couple table reference fields in my queried table. I believe I have the add-ons setup correctly with random sort, but when I query the main table (with the add-on decorators) it returns the json in order. This makes sense for the "boards" themselves, but I would expect the "Tops" and "Bottoms" to be returned randomly within each JSON object?
[Screen Shot 2021-09-09 at 9.54.24 AM.png]
[Screen Shot 2021-09-09 at 9.54.41 AM.png][Screen Shot 2021-09-09 at 9.55.00 AM.png][Screen Shot 2021-09-09 at 9.55.50 AM.png]
[Screen Shot 2021-09-09 at 9.54.24 AM.png]
[Screen Shot 2021-09-09 at 9.54.41 AM.png][Screen Shot 2021-09-09 at 9.55.00 AM.png][Screen Shot 2021-09-09 at 9.55.50 AM.png]
Comments
-
Hey Andrew - just want to make sure you got your answer during office hours today?
-
- Thanks yes it did help me immensely. I'm really interested in exploring that match score idea further. One thing I ran into though and this is probably because I was only randomize 3 records, but sometimes it produced a duplicate "board" one after another (Sean ran into this in the beginning by coincidence). Is there anyway to prevent that? Using conditions? Or some other way? Thanks again for your help.
-
I apologize I don't have the full context as I was in a breakout room during this part of office hours... But perhaps set a unique index on your DB table and include the combination of fields that you wish to be unique (ie tops, bottoms)
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback