No need to apologise to me. I think we like to blame the tools when infact it is the workmen that are at fault, myself included!
It's not complex it really is a few clicks.
Seriously? Sorry I just read this while composing my above reply... You apologise and then say I am disrespecting you? Mate I'm not one for grief. I'll withdraw from this thread before I do disrespect you intentionally. Good luck.
Clicking a hyperlink passes the Event ID to the Registration Form page that the user continues filling out and then submits to be stored in the database.
I need to run a Query from the Username posted value on the Login page.
I have always used invisible sessions to pass along value that I can use in a query on the next page.
I want the User information for this particular logged in User to show up on this Event selection page.
I just need to get this one value to show up.
I suspect the âthe method we have used repeatedlyâ has a particular sequence that does not match exactly with the documentation.
In essence, from the time the User successfully LOGGED IN they were Filtered immediately
ONE record was matched to the KEY value included in Username. It ran a query that I created to go and do that action. The action Works fine.
I wish people would really understand âit really is a few clicksâ is exactly how I have to get things done in Wappler.
There are no shortcuts, not even for me.
Click, click, click that is how I do it!
When I have things that match the steps in a tutorial I more often than not get pages built with actions that create tables, insert tables, update tables.
It is the FACT that I DO CREATE all kinds of pages in Wappler that gives me the feeling that I am understanding the basic principles.
When i troubleshoot and cannot find a REASON that I can detect because I really donât know what the Wappler code is always going to look like on the page for each application.
So, I thank people who take a look over my shoulder , so to speak, to see if something jumps to their attention.
So far, people have really been good about using their experience to help.
This will get you the user details using the security provider ID (a session is set on successful login automatically you really do not need to set others unless you really want them). You can then use this session ID to filter other DB queries using this ID as the key value...
Once you have matched the user using the above method we can go on to sessions again (if you want to set further sessions like I suggest in my initial reply). In all seriousness once you have done this a single time then next time it really is second nature and so simple. That initial hurdle can be a bastard though, we are all our own worst enemies in this regard. I believe we like to think it should work 100% of the time, but again and again I neglect to RTFM..... Teodor can back me up here. The amount of times I have ignored clear and concise instructions is huge, not as many times as I have made myself feel like a complete dickhead though, outweighs the former 10/1.
I agree that Daveâs way is the way to actually do this, however just my two cents.
Step 1: You click in the App Structure, on App
Step 2: Click the + button, select State Management area
Step 3: Choose Session Storage Manager
Step 4: Click the Define Session Storage Items in the Session Manager Properties
Step 5: In the popup window, click the + button and name your variable (In your case sessionusername as a number is what you chose)
Up till now, you have created an empty session that holds nothing at all, you have to SET something inside the session variable you created, so if you had a form, with some inputs, and the user just typed in their username, then you have to create an onclick event on the button, or an onsuccess event on a submit button, and inside that event, you will see your empty session, which you can then insert data into from one of the form inputs.
This is what I had set up on an earlier unsuccessful try
I had set up the Login page submit button to âstoreâ Session items
when the Submit button send the login data for comparison to user identification table.
What I kept looking for was the specific Username field to show up as THE variable that I wanted to Store for retrieval inside the user session on other pages.
I couldnât find the specific instruction for making sure that I was passing a real posted value.
Ok so now hit the + button while you have Set highlighted
session1.set will then move under browser1.goto
Click on it, in the properties below it, click the name area and a popup list of available variables shoud display, in your case click sessionusername
Now click the lightening bold next to the value field, a list of available bindings should display, you need to choose your form 1 Text Input Username Value.
Now on your next page, you already have the session storage manager in place so you just need to call it anywhere on your page
This is the resulting page code â I am trying to pass that {{session1.data.sessionusername}} value.
It does not produce a value here or in the top of the page where I had tried binding the value to text in the title of a query.
One more Save, Save, Refresh loaded code in Wappler
Bingo!!
EVERYTHING forward has hinged on this!
Thank you again for walking through the last steps that I just didnât see in the documentation.
Iâve always understood that you have to Set the Session Value first and then refer to it in other documents.
What I was lacking was the knowledge of how many steps are necessary with this in Wappler and also that while I can understand logic what I donât know intuitively is what it LOOKS LIKE in so many settings before youâve reached the desired goal.
Thank you for opening up this part (so far)
If I canât pass vaues I am screwed.
As a final note on this topic, when working with session variables if you do not get the result you were expecting, try doing force refreshes or closing and reopening the browser window as it may need to clear a session variable before your new one will show.