Hello, I’m new to Wappler and I’m trying to do something very simple. Can someone help me?
I need to display the value of a session variable I created in the backend on the frontend. I can not have button to display it, so I need to keep the auto load serverconnect as default on my user page.
What am I doing wrong?
I think "Session Storage Manager" refers to client-side sessions, not server-side ones. With that in mind, you can forget that approach.
Your Server Connect approach would work, but it's weird you're not seeing the token_passaporte variable. I noticed in you first screenshot the file is not saved (there's a blue icon in the tab) - have you actually saved the file?
And then try to select again the Server Action in your Server Connect element properties.
Hi Apple,
Thank you for enlightening me about Session Storage Manage.
Yes, I saved the file 1 million times hahaha
I recreated the API a few times too, thinking it might be some bug. But the variable doesn't appear to me in the front, even though its output is marked in the back.
Just chipping in what if you hard-code a 'temporary' session value and see if that is echoed just to check the session is populated with a value? It may be empty and in that case you need to chase that up and insure it is populated with the value you wish to display?
What you say makes sense.
After add a set value both (set session and set value) appeared
Anyway, despite selecting, the values are not loading.
I tested with static value (123), but nothing comes to my page when I go to localhost.
But now I think it will be something simple to solve. I'll try here.
Thank you very much for the help.
Hello Ben. It's a pleasure to talk to you.
This is what I did to Server Connect. Anyway, I can not display the variable value on paragraph.
Should I have done something else about Server Connect link to the API?
Ben, I copied exactly what you did and it ran perfectly. There's definitely something wrong with my old API. I'll redo it.
By the way, it's been challenging to learn Wappler, since I'm not a developer, but it's been amazing.
Thank you very much
@Mariana1, you're taking the right steps in becoming a developer by going with Wappler. Between it's abundant no-code/low-code features and the amazing Wappler community's help, you'll be building cool apps in no time. I was a full blown PHP developer already when I started using Wappler and even I have learned quite a lot since joining this community. Now, I'm not even using PHP anymore and building NodeJS apps which I would have never attempted without Wappler.
Good luck with your project and welcome to the Wappler family.
In Node, setting output to a session variable returns its value.
In PHP, setting output to a session variable declaration does NOT actually output anything.
To get around this i normally add a set value stage immediately after with output set and assign the value of the session to it which outputs the value.