Show variable value in embeded form

So yeah, very stupid question, but how would I show a process variable in an embeded form?

I know how to set it it but cant figure out how to show it.
In the first task I set the variable as folows:
<*label for=“tweetContent”>Tweet
<*input cam-variable-name=“content” cam-variable-type=“String” class=“form-control” required="" />

(without the * ofcourse)
And it works, since I am able to see the variable in the cockpit.
Now how would I go about showing it in the next form?

Thank you for your help

1 Like

If you have an input with the cam-variable-name and cam-variable-type attribute set, the Tasklist automatically fetches the process variable, if it exists. So in the next form, you can have the same input field you used to set the variable, to retrieve, display, and possible change it. Of course you can also set the input field to readonly or disabled.

If you would rather use Javascript to load the process variable, you can hook into the form lifecycle to load additional process variables.

1 Like

Hi,

to show the variable in read only modus you have to use the angular expression:
{{ $scope.varname }}

Hope this helps,

Ingo

Thank you both! Both solutions work.

Please correct me if im wrong:

When two embedded forms have the same variables with cam-variable-name and cam-variable-type set and the previous form fills in the required data. The following form should be able to display the data which were provided by the previous one?

Is the Javascript (please see Ingos response) necessary?

Your assumption is correct. You need Javascript only if you do not want to use an input field with the cam-variable-name and cam-variable-type attributes.

1 Like

Hello,

Unfortunately, me i don’t see and i can’t fetch my checkbox variable in the next form …

In fact i display my checkbox from a process variable ==> The html code is stocked in a process variable which i display via innerHtml function of Document.

Can you tell me why i have this issue please ?

Thank you.