Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I've been trying set up an automation to writeback some variables set by the end user to an external excel file in a sharepoint folder.
For that, I'm following the basic example from Michael Tarallo on the Qlik youtube channel (https://www.youtube.com/watch?v=hYER2nGKctM&ab_channel=Qlik) , which is based on another article (https://community.qlik.com/t5/Official-Support-Articles/How-to-build-a-write-back-solution-with-nati...) .
However, I'm having a problem when replicating the current state of variables to the Automation.
I tried replicating exatcly the same steps:
1. Setting the layout, creating the variables, update and reload buttons:
(layout - as you can see, the standard values for the variables are '-', since I'm using the fields as definition)
(Update button settings - Include Selections checked!)
2. Creating the automation using the 'Copy Input Block' blocks and adding the three Get Expression Value blocks.
To check whether it is getting the current variable value from the temporary bookmark, I also added an Output block:
(note that the app and bookmark IDs are the same from the used input block)
However, I'm not getting the expected result:
After setting different values to the variables with the Input visuals and clicking the Update button in the Analysis App, the output always gives me the default value of my variable.
(note that in the app front-end, the variables are updated)
It's as if my variables were not being updated (or bookmarked) to the current values when sent to the automation.
In this specific example, it's not generating any output, since my variables by definition are the fields, which gives me '-' as an output, as per my first step.
I also did another test, setting the definition of the variables as fixed strings. In this case, I always get the same strings as output.
Would anyone know if there's any step I'm missing? Or if there is any kind of limitation to a specific type of environnment?
PS: I found some other posts about selections issues for generating reports, but I coudn't find something specific for variables and writeback function so far.
Hi @AfeefaTk ,
I can confirm that if the variable is defined as an expression (starting with the equal sign, like "=Comentarios") the automations ignores the user value.
If the variable is defined as a 'constant' (without the equal sign, as example using the string 'Default comment') then the user input is passed to the Automation.
The problem is, using a constant, the value does not change with user selection, so the variable input will always show 'Default value' (or whatever the user has input there) even if the selected record already has another comment (making it very easy to overwrite a record with the wrong value).
All in all, this behaviour seems to be different than what is shown in the video.
Hi @danabb
I would suggest you follow a different approach mentioned below to get the user-inputted values passed over automation and also have the selected values auto-populated in the input box.
Please find the automation and app configured following the above steps for your reference.
Please let me know if that works.
Thanks
Hi, @AfeefaTk
Thanks, using 2 set of variables works like a charm!
The only step I had to add was to add more "set variable actions" to make sure the new variables returned to the standard value (vDealName2 = DealName).
So for me it worked like this:
(step 6 added)
Thank you very much. I will run some tests, but I think this will be sufficient.
However, would you know if more than one user can run this automation at the same time?
For example: I have a team of salesmen and they are using this tool to check and update information for their customers. They both are using the dashboard at the same time with different customers.
Hi @marcusva
Yes, those who have access to the button can click on the button and run automation if it's set to run in triggered mode.
As mentioned in this article (check Limitations section) automation cannot have parallel runs. So if the button is clicked by different users at the same time, it won't get executed at the same time. The new runs will get queued and start running once the previous run is completed.
Hope this answers your question.
Thanks
I had the exact same issue. I suggest the demo material for this specific case (loading a value to an input box, then updating and writing back) for this functionality be removed/updated.
Creating a basic write back solution with Qlik Cloud - YouTube
Video ‒ Creating a basic write-back example with Qlik Cloud | Qlik Help
Thanks for the solution/work-around @AfeefaTk!
I had the same issue and your solution helped me a lot. Thank you very much.