I wrote the following JavaScript inside a Custom HTML field at a Joget form:-

<script type ="text/javascript">
$(document).ready(function () {
    var paId = #variable.imagurl#;

    var fullurl = 'http://localhost:8080/jw/web/json/workflow/process/list?j_username=kermit&hash=9449B5ABCFA9AFDA36B801351ED3DF66&loginAs=customerservice&packageId=' + paId;
    $.ajax({
        type: "GET",
        url: fullurl,
        dataType: "JSONP",

       // code goes here
</script>

So i need to access the value of the workflow variable using the following:-

 var paId = #variable.imagurl#;

But it seems that I am unable to do so. so my question is how i can access the hash variables from a javaScript written in Custom HTML field at the joget forms?
Best Regards

  • No labels

2 Comments

  1. Hi BPM,

    What you did seem to be correct.

    Something to note here is that this particular hash variable will only work if and only if the form is used as part of a workflow process. Are you using this form as part of a workflow process?

    Cheers

    1. yes sure the form is part of a workflow and it is mapped to an activity.

      Best Regards