Mashup APIs - add button to set variable using setContent Method
I have a qlik sense mashup html which is up and running. I want to be able to change variables I have in my script through a web interface. Ideallly, I want to create an input box and button into my mashup which will update a variable in qlik sense. I've seen code examples in existing mashups on using the setContent Method, but not quite sure how to have that interact with an input box and button combination. Does anyone have an example of this already working?
Ok, I figured out what I was doing wrong. In my JS file, I needed to have this in the same section as my app.getObject calls are made, before I included this in a separate function section which didn't work since it couldn't recognize the app. I was able to troubleshoot using the inspect feature of google chrome, which really helped debug it. Thanks Francis for your help!
Awesome! I was just writing a reply with some instructions on checking this out in the dev tools, but seems you found your way, nice! Yep, any reference to 'app' will have to be in the same "scope" where 'app' is defined.