Apologies if I have misunderstood something simple - I have a component that is populated by data from a Xano table. The component has a checkbox next to it. This is then placed in the page within a list. I want the users to select the check box and the name of the produce to be saved to a data slot.
I essentially need to iterate through successive data slots (i.e. ds_ing1, ds_ing2 - up to 5) adding the produce text field to the next empty data slot. I will then make an API call to Xano using these dataslots.
I hope I’ve explained this clearly! Some screenshots for clarity:
Hi, I’m not sure what kind of Api endpoint you’re using but Xano can handle the JSON as part of the request. So you could simply build (with a script) a json into one data slot and then send that into Xano endpoint while calling the API.
If you’re simply filtering something based on the checkboxes then you can probably just build a comma separated list into Data slot and use that as filter in the endpoint and query.
Thank you Adam for this! The data slot pull down feature has helped massively! I am currently trying to implement Antti’s suggestion - I may come and bug you all again but want to try and figure it out myself first (or at least give it a good crack).
I have some experience of programming but it is largely very simplistic, science based stuff in Python and VB - I do tend to find with things like this there is a light bulb moment where everything clicks!
Just for completion, and possibly for other’s future reference.
I decided to set this up server side (holding the ingredients in an array, then appending to the API call).
I couldn’t get the checkboxes to trigger the API call so I went with Icon Buttons which seems to work perfectly (just change icon when they are selected). In Chrome, when I clicked the original checkbox, nothing seemed to happen in the developer box network thingy (technical speak ) but works beautifully with an icon button.
Thank you for the comments and links, this software has enabled me to do something I never thought I would be able to!