Hello,
I’m building a web app which using softr for front end and Xano for database and backend.
The List blocks in softr are getting the correct info from the Xano database through the native integration.
Now, I’m also trying to add a custom block that needs to do some basic multiplication. For inputs to the custom block, I need to use the data that is already available in the other list block. Is there a easy way to access it?
Alternatively, I can also get that info from Xano directly using the API call in the custom code block, but my custom code block does not know the ID to reference to get the corresponding info.
Would greatly appreciate any help if anyone has already dealt with this situation.
Hi there. Just wanted to say that I’ve read your message and don’t know the answer so I’ve shared it with some of our team members to see if they can help.
I recommend applying the “smart backends, dumb frontends” principle here.
“Smart backends, dumb frontends” is a software development principle where most of the application’s logic, data processing, and security are handled by the backend (server side), while the frontend (client side) is kept lightweight, focusing mainly on displaying information and interacting with the user.
Whatever multiplication/calculation you need to do, try to do it in Xano itself. Softr front-end should only be used to display the information.
If you can share more about your use case, I can try to help you further. Thanks!
1 Like
Other option can also be to use a SQL query on top of Xano data to get the data in a format you need.
Thank you for sharing it with the team! Happy to jump on a quick call to provide more context into my problem/requirement. I think this would be a common requirement for other people using softr too.
I agree, I can implement all logic in the backend and use front end only to display stuff. My challenge right now is to be able to have my custom code block get access to all the info related to a particular list ID. So even though I can call the API, the custom block doesn’t have info on what variable values to pass even though that info is available to other list blocks on that page
Why do you need to make an API call? And why are you using a custom code block? What are you trying to do exactly?