Trouble with Query based on Session variable

Okay, i have created an inventory page that holds the value of an inventory number in a repeat region.

I click on the View button and it sets the session variable and takes them to the inventory_details page and displays the correct Inventory Number based on the item that i chose.

Now, i have a query setup to pull the inventory details from the databased based on the session variable that was set. However, that query is not working at all. It doesn’t show any data or results.

what am i doing wrong here? I know its probably something simple but i just cant get it to work correctly.

The session variable

Server sessions and browser sessions are different things.
When using the session manager in App Connect you are setting a browser session, not a server session.
So using $_SESSION on the server side will return nothing, as you have not set a server session.

okay, gotcha. So how would i set the server session based on the item that is clicked on the web page?

There is a set session step in server connect, use it to set a session value.

like this?

Well this is the step, but i am not sure you are setting the right value there.
What is your goal here and do you really need to use sessions?

that worked - thank you. But quick question…is there a way to pull query data based on a browser session variable instead? or only from server session variable.

Well yes, you can pass the browser session to the server action. Create a GET variable and use it to filter the query, then on your page bind the session value to the get parameter.

But as i already asked - why do you want to use browser sessions and not just filter your data using an url parameter?

i am trying to prevent the URL from displaying the InventoryNum for security reasons. This customer has security restrictions on the items that are available to be seen.

Using a browser session is the same as using an url param. Everyone can see the session value in the dev tools:

Screenshot_12

agreed. That is why i am trying to use just server sessions, but i was curious on the other just out of knowledge.