Does anyone know how to pass parameters from a Dashboard to a channel for launch

Does anyone know how to pass parameters from a Dashboard to a channel for launch process? Also, anyone know how to pass parameters, like process ID, from a Process Report row click to launch a process, passing the process ID ? It is clear a report can open and pass one parameter to other reports and dashboards, but apparently not launch a process. If a report row click opens a dashboard, that dashboard can contain a channel to launch a process with a parameter, but I am not successful getting a parameter to pass, eht expression editor for the channel value shows process variables as possible values, but the process never validates and gives the error that process variables cannot be used in a process variable expression. Any ideas?? Can a rule be used in the channel value to pass a parameter?

OriginalPostID-167996

OriginalPostID-167996

  Discussion posts and replies are publicly visible

Parents
  • @markw I could answer one of your questions which is as follows:

    Also, anyone know how to pass parameters, like process ID, from a Process Report row click to launch a process, passing the process ID ? - Yes it is doable. Here goes the pseudocode:

    1. In the portal report, on a column, construct a link with the desired parameters and their values as follows:

    /*
    http:///suite/process/configureprocess.simplepopup?processModelId=&transNo="&&"&pid="&pp!id

    Example:
    http://<1.2.3.4:8080>/suite/process/configureprocess.simplepopup?processModelId=304&transNo="&pv!int_transactionNo&"&pid="&pp!id

    */

    In the above example, transNo and pid are names of parameters and int_transactionID is a process variable and pp!id is a process property. Offcourse you can append as many parameters as you want. But once I heard that there is some limit for the length of url it seems, so I would like to suggest to check it.

    2. Create a java script function that parses the url and gets the value of a parameter:

    function getParam ( sname )
    {
    var params = location.search.substr(location.search.indexOf("?")+1);
    var sval = "";
    params = params.split("&");
    // split param and value into individual pieces
    for (var i=0; i {
    temp = params[i].split("=");
    if ( [temp[0]] == sname ) { sval = temp[1]; }
    }
    return sval;
    }
    /*
    Upload the above javascript in the KC.
    */

    3. In the process model which you are trying to launch from url,include the js created in Step - 2 in the start form.

    Make call to the function created in Step - 2:

    On the form load event, call the url parsing function as shown below and assign the value to the field which contains the PV value. If you don't want to show the process start form, auto submit the start form using javascript. And if you don't want to show the fields, hide them using the java script (But don't make them hidden using Appian's OOTB feature). You should have them on the form, because by using the javascript we are parsing the url and assigning the values. And after the form submission, the process variables hold values that were parsed and assigned by javascript.

    var transNo=getParam("transNo")
    var processId=getParam("pid")

    where transNo and processId are the field names that holds the start parameter process variables.

    That's how we implemented in our internal project long back. You could let me know if you have any questions.
Reply
  • @markw I could answer one of your questions which is as follows:

    Also, anyone know how to pass parameters, like process ID, from a Process Report row click to launch a process, passing the process ID ? - Yes it is doable. Here goes the pseudocode:

    1. In the portal report, on a column, construct a link with the desired parameters and their values as follows:

    /*
    http:///suite/process/configureprocess.simplepopup?processModelId=&transNo="&&"&pid="&pp!id

    Example:
    http://<1.2.3.4:8080>/suite/process/configureprocess.simplepopup?processModelId=304&transNo="&pv!int_transactionNo&"&pid="&pp!id

    */

    In the above example, transNo and pid are names of parameters and int_transactionID is a process variable and pp!id is a process property. Offcourse you can append as many parameters as you want. But once I heard that there is some limit for the length of url it seems, so I would like to suggest to check it.

    2. Create a java script function that parses the url and gets the value of a parameter:

    function getParam ( sname )
    {
    var params = location.search.substr(location.search.indexOf("?")+1);
    var sval = "";
    params = params.split("&");
    // split param and value into individual pieces
    for (var i=0; i {
    temp = params[i].split("=");
    if ( [temp[0]] == sname ) { sval = temp[1]; }
    }
    return sval;
    }
    /*
    Upload the above javascript in the KC.
    */

    3. In the process model which you are trying to launch from url,include the js created in Step - 2 in the start form.

    Make call to the function created in Step - 2:

    On the form load event, call the url parsing function as shown below and assign the value to the field which contains the PV value. If you don't want to show the process start form, auto submit the start form using javascript. And if you don't want to show the fields, hide them using the java script (But don't make them hidden using Appian's OOTB feature). You should have them on the form, because by using the javascript we are parsing the url and assigning the values. And after the form submission, the process variables hold values that were parsed and assigned by javascript.

    var transNo=getParam("transNo")
    var processId=getParam("pid")

    where transNo and processId are the field names that holds the start parameter process variables.

    That's how we implemented in our internal project long back. You could let me know if you have any questions.
Children
No Data