Can someone tell me how to update the database with the information in the selected/current tab?
Let say I have a table called “Person” with the proprieties (type, name, age and sex).
Let say I have 2 tabs called “Student” and “Teacher” with text fields (name, age and sex).
How to update the table in the database with the information entered in the selected/current tab?
I tried to use State to store the information in the state property when user select the tab but it does not work when the information are entered after the tab selection.
Are you wanting to create new users through these tabbed groups or modify existing ones?
To create a new student, for example, you would create a workflow (could be off a button click) to create a new thing (Person). Then define all the fields… Type = student, name = input name’s value (from an input in the student tab), age = input age’s value, etc.
This would create a Person entry in your database and since the field for type is defined as “student” then you’ll be able to filter between the two types using that field in searches.
Hope this helps you get in the direction you need.
Hi, yes, so you definitely have access to text inputs that are on your page. Could you share a link to your editor or screenshot of the elements involved? There’s some context that I might be missing, but it sounds like you either need to just identify the input within your workflow or use a custom state to retrieve a specific value.
Ok, when you click Add, you’re “Creating a new agent” right?
So if Agent is 1 data type, you have:
Agent
first name (text)
last name (text)
tags (list of texts)
Team ( Team)
etc.
So if Transport is its own data type…
Transport
Description (text)
Color (text)
etc.
You would also have a field under Agent that is “Transport” and is type Transport (just like Team). So when you create a new agent, you’re also creating a new Transport…
So the workflow would be when Add is clicked > Create Agent > Create Transport > Make a change to step 1 (creation of agent) where transport = result of step 2.
Alternatively, if you just have all the transport fields under agent like:
Agent
first name
last name
transport description
license plate
color
Then when you create a new agent, those fields simply = those inputs in the tab.
Also, if you’re not seeing the inputs when you create Transport, then create custom states and then the values equal those states.
For example, when train description input is not empty > set state > select an element to hold the state (type text) and define the value as that input’s value. Then, when you go to modify the database field, that field = the custom state’s value. You can have multiple custom states created for as many fields as you want.
If you share a link, I can help much more with your exact data structure and workflows.
Setting states is a workflow action, not a conditional setting. So “When button Add Is clicked” > set state (this is an element action).
I’m on mobile right now so I’m unable to share a screenshot, but create a workflow for the button click. The custom state would be an action you’d have along with creating a new agent. I can help more with a link to your editor once in back on a computer.