Thanks in advance. I usually can figure stuff out by just watching videos. There is just something simple I must be missing here.
Best example. Say I do roofing. I send out a rep with a tablet.
The rep that is creating the quote would be the “current user”
On the first page, I have a form, create a new client or dropdown list of clients unfinished quotes.
Submit button.
A second page opens up and the info inputted is now tied to that client to further their quote.
That’s where I am… I cannot seem to be able to get that clients info to carry over… No matter what set state I seem to try.
So what would be the exact set state you would use to send that info from a button to another group/page. and on that receiving group, what would the set state have to be to?
Probably simple, I just cant seem to make it work.
A tip, states are tied to for instance a page. If you open a new page, there is no state. You can see state as some sort of bucket that you attach to an element. A page or element on a specific page.
Have you considered making both (or all) parts of the form on one page, but in different groups or repeating elements? You could hide the second group until the user clicks the Submit button in the first group, then make the second group visible and hide the first group. In this way, the page itself could hold the states as the user progresses through the form. Make sure to check the box to collapse hidden groups.
If you prefer to have them on different pages, the database could be used to hold the data from page to page. Another option is local storage (cookies in the user’s browser) with the help of a plugin.
States disappear when you go to a new page or when you refresh the page. It only holds data temporarily.
You can send data to the next page with URL parameters or like the previous person stated, you can create something in your database to hold the data and then pass that to the next page.
I know it’s confusing but once it clicks in your brain it will make sense. Just be patient and keep trying. You got this!
Is your second page another actual page ? OR is it just a group that shows in the same page when you click the submit button ?
If it’s in a second separate page, then you shouldn’t use states, you should send a page parameter and in your 2nd page, you should set the data type to “Client” data type so that’s what the page expects.
While if it’s a group that shows in the same page when you click submit, then you can use a state to save the “Client” info.
About database info storage, generally you should store data in database when you really need to save it for long time but for the case of passing info between pages, you needn’t use database although it will work
Use the step by step debugger to see if the information you are passing along actually has data.
You should probably have a list of clients and then pass along the current cell or parent group client to edit them. Work your way up the ladder to make sure each group has the data you need being passed along.
Humm, Well that’s a start. See I was thinking that the button is not tying to the previous client data, but thinking how could that be, as I thought it was from the button onward?
I have them all client parent groups client?
Thanks for the response, Let me think on that and look,