Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
LET vQueryValue = 'QueryValue';
LET vReturnValue = '';
CUSTOM CONNECT TO "Provider=QvRestConnector.exe;url=http://localhost/Product.WebApi.Service/api/Product?producName=$(vQueryValue);timeout=30;method=GET;...";
Products:
SQL SELECT
"Id",
"Name",
"Price"
FROM JSON (wrap on) "root";
[root]:
LOAD [Id],
[Name],
[Price]
RESIDENT Products;
UPDATE:
I tried a simpler version. It seems like I can't actually do what I'm thinking. Does anyone know if QlikView can do this?
I have this script in a tab:
CUSTOM CONNECT TO "Provider=QvRestConnector.exe;url=http://mccrearya-lt.assurity.local/Product.WebApi.Service/api/Product?productName=fred;timeout=30;me...";
ProductsTest:
SQL SELECT
"Id",
"Name",
"Price"
FROM JSON (wrap on) "root";
[root]:
LOAD [Id],
[Name],
[Price]
RESIDENT ProductsTest;
LET vReturnValue = Peek('Name',0,'ProductTest');
If I debug I see the right value, and if I set a textbox it gets populated with the right value.
What I'm trying is when you click a button, I have an Action Dynamic Update where I run that same script, but the value doesn't get set - in fact it looks like that step isn't even running.
So for the sake of clarification: On my dashboard, you press a button, I would like for the Action of that button to be to call the web service and put the result in my variable.
It looks like I'm not using the right Action or maybe QlikView just can't do that.
Any help is appreciated.
UPDATE:
I tried a simpler version. It seems like I can't actually do what I'm thinking. Does anyone know if QlikView can do this?
I have this script in a tab:
CUSTOM CONNECT TO "Provider=QvRestConnector.exe;url=http://mccrearya-lt.assurity.local/Product.WebApi.Service/api/Product?productName=fred;timeout=30;me...";
ProductsTest:
SQL SELECT
"Id",
"Name",
"Price"
FROM JSON (wrap on) "root";
[root]:
LOAD [Id],
[Name],
[Price]
RESIDENT ProductsTest;
LET vReturnValue = Peek('Name',0,'ProductTest');
If I debug I see the right value, and if I set a textbox it gets populated with the right value.
What I'm trying is when you click a button, I have an Action Dynamic Update where I run that same script, but the value doesn't get set - in fact it looks like that step isn't even running.
So for the sake of clarification: On my dashboard, you press a button, I would like for the Action of that button to be to call the web service and put the result in my variable.
It looks like I'm not using the right Action or maybe QlikView just can't do that.
Any help is appreciated.
After more research I have determined that the answer to my question is "this is not possible".
You can do it in the development environment because you're operating on the qvw file itself.
The QvRestConnector is still useful, but does not solf this particular problem.
UPDATE:
I figured out how to do this. You don't do it trying to call a webApi from Qlik,
You use div integration and mix the Qlik objects and your web objects on the page.
Then when a user clicks on the grid (in this case), you can run your own javascript to
call the webApi and display the results in the page along with the Qlik objects.
Details on my other post "Dynamic DIV-tag integration".
Thanks to Alexander for the response and suggestion.
Turns out I was on the right track - attach to the dynamicly rendered QlikView object divs
in QvContent rather than tring to capture the Qlik Object events themselves.