Connect tables
Hello,
I'm new to Xano and began with creating my back-end which is super exciting but at the same time challenging for me, having no background in coding!
My objective is to create a web application where users can set one to many objectives and define a tailored strategy for each of these objectives.
In terms of tables, I created:
1) A users table
User 1
User 2
User n
2) An objectives table :
Objective A
Objective B
Objective n
3) A strategy table: Each strategy type (1, 2, 3 ) is associated with a given return (e.g. strategy 1= 10%, strategy 2=15%, etc)
Strategy 1
Strategy 2
Strategy n
What I try to accomplish: I would like to be able to define that each user can select one to many objectives and for each objective, select a dedicated investment strategy.
I tried many things with objects, enums, etc, but failed so far. Could someone guide me to how I should structure this to make it work ?
Thank you
Best Answer
-
Hello Pawel,
I found a way using objects and got some support in the Open Hours. Thank you for your help
Answers
-
Hi,
From the top of my head. I would create a list of objects in your user table that have at least those two fields objective_id(relation to objective table) and strategy_id(relation to strategy table).
This way you can have a list of many objectives and for each of them assigned strategy, additionally in your endpoints you can use addon feature to pull data from both objectives and strategy table via those table relations.
If you are interested I would be happy to help you with the difficult parts of your project, just drop me a message: pmagdanski@gmail.com
Additionally I can highly recommend @Ray Deck and his statechange.ai as a great source of knowledge and help in Xano and no/low-code in general. -
Hi Pawel,
I tried that but I don't think I understood how to proceed here.
I created rows for each objective and strategy type in their respective tables but can't find how to select these from the user information table. I tried using enum but I can only select one. How should I modify that ? thank you! -
You should table reference:
Then in your endpoints you can either join tables via those references or use addons.
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