-
Re: Triggering actions from Extensions
Brian Munz Sep 20, 2012 3:15 PM (in response to Daniel Rozental )What kind of actions are you looking to trigger?
-
Re: Triggering actions from Extensions
Daniel Rozental Sep 20, 2012 3:17 PM (in response to Brian Munz )I'm looking to trigger a dynamic update through a button.
-
Re: Triggering actions from Extensions
Brian Munz Sep 20, 2012 3:20 PM (in response to Daniel Rozental )I assume the QVW/QVS would be setup to support dynamic update on that app? If that's set up properly (and keep in mind this feature is very tricky and delicate), the app will update as soon as the data is changed. Do you want the button to somehow update the data set?
-
Re: Triggering actions from Extensions
Daniel Rozental Sep 20, 2012 3:22 PM (in response to Brian Munz )I know I can use buttons to update the model, what I'm looking for is a way to enter information in an extension and then somehow, be able to insert that information into the model.
-
Re: Triggering actions from Extensions
Brian Munz Sep 20, 2012 3:27 PM (in response to Daniel Rozental )The only experience I've had with this was where I set up an extension to insert data into the SQL database that held the app's data. This database would then run a job that used the QlikView OCX to insert that data back into the app, which would update itself since it was running dynamic update.
Kind of a weird roundabout way to do itm and obviously not ideal.
-
Re: Triggering actions from Extensions
Daniel Rozental Sep 20, 2012 3:29 PM (in response to Brian Munz )Thanks a lot for your input Brian, I just thought there might be a way to do it directly through the JS API or at least be able to trigger a button click from within the extension.
-
Re: Triggering actions from Extensions
Brian Munz Sep 20, 2012 3:34 PM (in response to Daniel Rozental )Well I'm fairly certain updating the model from the JS API is not possible, but I'm pretty sure you can similate a button click from inside an extension. How javascript savvy are you?
What you could do is target the ID or class of the button (if possible...i'm not sure actually if the object IDs are yet available in the html code), and use the following jquery code to similate a click:
$("#your_item").trigger("click");
Another way I've triggered events from extensions (this might not work for what you need) is by changing variables from inside the extension and having triggers on these variables which run actions when the variable is updated.
THis might be a bit roundabout for what you're trying to do, but....that's what I've done before for other purposes.
-
Re: Triggering actions from Extensions
Daniel Rozental Sep 20, 2012 3:36 PM (in response to Brian Munz )Great, that seems close to what I'm looking for. Thanks again.
-
Re: Triggering actions from Extensions
Daniel Rozental Sep 20, 2012 3:59 PM (in response to Daniel Rozental )Brian, any chance you could share your code about changing variables from within the extension?
-
Re: Triggering actions from Extensions
Brian Munz Sep 20, 2012 4:04 PM (in response to Daniel Rozental )Sure. If you have a variable name vTrig that you want to set to a value of "update" the code would look like:
var mydoc = Qv.GetCurrentDocument();
mydoc.SetVariable("vTrig", "update");
-
Re: Triggering actions from Extensions
Daniel Rozental Sep 20, 2012 4:05 PM (in response to Brian Munz )Thanks
-
-
-
-
-
-
-
-
-
-