Create a varibale when clicking on custom button

Hello Everybody,

Can you tell me how can i create a new variable on camunda when clicking on a custom button ( not save and complete) ?

In my custom Form i have a button : when i click on (Onclick) i want to run a function to create the new varible.

Thank you

The button would need to implement this rest call which would set the variable in the process instance.

Hi Niall,

Thank you for the response.

Can you give me the html and javascript code to do that if possible ?

Thank you

With the link above this stackoverflow answer you should be able to knock it together yourself easily enough.