Hello!
I am having difficulty configuring the FILTER on a grid to use a session variable. I have watched the videos and followed the directions (I believe) correctly.
I have a session variable used throughout the application for CompanyId. So my goal is to filter each grid on CompanyId. When my grid is based on a sql query instead of a table or view I am getting an error when I try to run it in LIVE PREVIEW on localhost.
400 Bad Request
Unsafe Session variable syntax. Session variables cannot be created or assigned from either the Query String or POST body.
Can someone tell me what I am missing?
1) I created an argument in DEFINE ARGUMENTS called CompanyID, based it off of a session variable companyid, set default value to -1 (data type is Character, same as the session var)
2) Built the query in the SQL genie as follows:
SELECT *, 0 AS admincharge FROM manual WHERE company_id = :CompanyID AND section_id > 0
When I execute the query in the genie, it runs as expected and prompts me for CompanyID (currently set to the default -1) but I can change it to whatever test data I am using and see the desired results correctly. But once I run the module in LIVE PREVIEW, I get the error mentioned above.
It seems pretty cut and dry but I can't get it to work nor can I figure out how to troubleshoot. Any help is appreciated. I am using v11. Thanks so much.
I am having difficulty configuring the FILTER on a grid to use a session variable. I have watched the videos and followed the directions (I believe) correctly.
I have a session variable used throughout the application for CompanyId. So my goal is to filter each grid on CompanyId. When my grid is based on a sql query instead of a table or view I am getting an error when I try to run it in LIVE PREVIEW on localhost.
400 Bad Request
Unsafe Session variable syntax. Session variables cannot be created or assigned from either the Query String or POST body.
Can someone tell me what I am missing?
1) I created an argument in DEFINE ARGUMENTS called CompanyID, based it off of a session variable companyid, set default value to -1 (data type is Character, same as the session var)
2) Built the query in the SQL genie as follows:
SELECT *, 0 AS admincharge FROM manual WHERE company_id = :CompanyID AND section_id > 0
When I execute the query in the genie, it runs as expected and prompts me for CompanyID (currently set to the default -1) but I can change it to whatever test data I am using and see the desired results correctly. But once I run the module in LIVE PREVIEW, I get the error mentioned above.
It seems pretty cut and dry but I can't get it to work nor can I figure out how to troubleshoot. Any help is appreciated. I am using v11. Thanks so much.
Comment