Forums

Forums / Developing Portals / Business Process Flow in TPC

Business Process Flow in TPC

Thread is closed for posting
2 posts, 1 answered
  1. mbayes
    mbayes avatar
    17 posts
    Registered:
    29 Dec 2015
    09 Feb 2016
    Link to this post
    Hi everyone,

    I just had a quick question pertaining to business process flows. Is there some kind of control that you can add in the portal to visually display the process flow?

    What we are trying to accomplish is to have a visual representation of the process for a user. If a business process flow in CRM has 5 stages, then we want to display 5 "greyed-out" stars. When the user transitions through the process, we want the grey star to become "filled" or "lit-up" when they have completed the stage.

    Is this a possibility in the portal?

    Thanks!
  2. Missing user
    Missing user avatar
    Answered
    09 Feb 2016 in reply to mbayes
    Link to this post
    Hi Matt,

    Yes, you can achieve it following the example below;

    1) ​Create one flag field that will tell what stages have been completed. It can be a textfield or option field with options such as; Completed Stage 1, Completed Stage 2, Completed Stage 3, etc..

    2) On each form add this field and keep it hidden using the CSS widget and putting the code like ; 
    .TextfieldDeveloperName
    {
    Display:none;
    }
    3) At Stage 1 form, you can have a javascript function to trigger on "submit button" which will simply set the hidden field value = " Completed Stage 1". You can call this javascript function under the advance property of Submit button by putting its name() in "OnClientClick"

    4) Also, add another javascript function on the Stage1Form that will execute on form load and will check if the stage one has already been completed and then simply change the Gray start color into Yellow or any other color as you like. Make sure you select the property of javascript widget to place by the body closing tag.

    You can put the code below at a page level or template level so that you don't need to place it in each form of five stages. Example Code;

    $(window).load(function() {
    var checkhidddenfieldstatus=$find($(".DeveloperNameofYourHiddenField").attr("id")).get_value();

    if(checkhidddenfieldstatus!="" && checkhidddenfieldstatus!=null)
    {
    if (checkhidddenfieldstatus=="Completed Stage 1")
    {
    // set the star background color
    $('.IdofyourstarforStage1object').css('background-color','yellow');
    }
    if (checkhidddenfieldstatus=="Completed Stage 2")
    {
    // set the star background color
    $('.IdofyourstarforStage2object').css('background-color','yellow');
    }
    if (checkhidddenfieldstatus=="Completed Stage 3")
    {
    // set the star background color
    $('.IdofyourstarforStage3object').css('background-color','yellow');
    }

    }

    });


    If you have any further questions you can also discuss on our daily Q & A sessions.


    Best Regards
    Syed
    Last modified on 09 Feb 2016 17:02 by Missing user
2 posts, 1 answered