we have a process where we store some variables containing PDF files. In our embedded form we load a JSON that is containing the variable names that have the PDF files. Like
Now we want to have Downloadbuttons for each variable that is containing a PDF. We want to fetch the variable when the button is clicked. But we get the following error message:
When you call fetchVariable(), you simply mark that variable to be fetched from the back-end. But the actual fetch from the back-end would take place during the second phase of the form life-cycle.
In the second phase, a request is made to the server to gather the values of the variables declared in the variable manager.
Whenever you need to fetch a value for a variable from the back-end, make sure to mark it to be fetched before the second phase.
Hi, Hassang! I have a similar problem and unfortunately, camForm.on(‘form-loaded’) listener doesn’t help me because I didn’t know the variable name during loading form I would get the variable name later when the user press a button and run $http.post which creates the variable but how can I fetch it now?