Column depending on another
I have a column that depends on another. Depending on the value that is entered, the other column needs to be automatically filled with a predefined value.
I've been trying to do an endpoint, but isn't working.
Answers
-
Can you show your endpoint and at which point there is an issue?
-
I would advise the following steps using the full name from first and last name entered example:
- Create a variable that represents the dependent column. e.g. derived_full_name
- Write the formula that derives the dependent variable (the dependent column) from the input (entered) value. e.g. derived_fullname = first_name + " " + last_name. Note (first_name and last_name are inputs in this formula)
- To add to the table: Map the inputs (first_name and last_name) to their respective columns and the derived variable (derived_full_name) to the right column on the table.
This way, anytime first name and last name are entered, the full name is automatically entered too in the table.
See the screenshots of the example below
- The table:
2. The complete function stack:
3. The formula deriving full name (derived variable) from first name and last name ("entered" - inputs):
4. The mapping of inputs (first_name, last_name) and the derived variable (derived_full_name) to their respective related columns in the table. See the result on the extreme right.
The key is writing the formula that derived the dependent variable (column) to the entered inputs (columns) and then mapping both the derived dependent variable and the inputs to the right column. Please let me know if this works for you.
-
Thanks for the asnwers!! I was able to do it☺️
-
Glad it helped. Good luck on your project!
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