I’m sure I’ve missed something here, but I have a SELECT query which I’m attempting to constrain using a parameter. The parameter appears to pass through correctly, but the query returns all records, not records only containing the company_id I’m using as the parameter.
Query:
App Server Connect Properties:
Full Input Parameter: modal_company.modal_company_data.data.id
In the above Browser Results both results have the company_id of 6… The ID’s of the records are fine and both unique. Maybe change the company_id to a unique id… Or use the id of the records as the filter parameter?
And be sure to select this Query Parameter as your filter for the Server Connect get variable in your ‘result’ page Server Connect Action Input Parameter.
Ah, no I haven’t done that. But now I’m also wondering if this was the right way to do this vs the normal filter method which doesn’t require a query parameter?
You could set a cookie on click and filter by the cookie which is the way we like to do it, using a decent unique string as a UID rather than numeric sequential id’s which are easy to manipulate. I’m sure the page Query Params had something to do with it the last time we went this route though, via GET.
Add the Cookie Manager to your page. Define the cookie company_id in the cookie manager. Set this on click of the mouse in Dynamic Events picker.
In the Server Action add the cookie company_id under globals (keep your cookie names all lower case), select your company_id ‘equal’ select your cookie from under globals. Nice and easy! But this is not what you set out to achieve! Try the Query Params first and if that doesn’t work maybe consider the good old cookie route