Announcement

Collapse
No announcement yet.

How to create a counter and update in BPM flowchart

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to create a counter and update in BPM flowchart

    Hello,

    I am trying to update to create a flow chart to check the status of lead after 1 week, and if for example still not interested, it will will count once and then transfer to another assigned user. The main point is I want to get the number of times it passes through transfer, and update the description accordingly..

    This is what I tried:

    // Increment the number of count
    $count = 0;
    $NCount = $count++

    //Update the notes
    ifThen(
    $Ncount > 0,
    record\update(
    'Opportunity',
    'description',
    'It is transferred '+ $Ncount +' times'
    );
    );


    But it doesn't seem to work..here I am trying to increase the counter, and since it checks an opportunity, then update the description with number of times it goes through this task.

    I appreciate if you could help me!

    Thanks in advance!
    Judy

  • #2
    Hi Judy,

    I recommend using separate nodes: script task, gateway, task to update a record. You will be able to see in the process history how the flow was proceeded.
    Last edited by yuri; 03-02-2022, 05:00 PM.

    Comment


    • #3
      Originally posted by jd13579 View Post
      Hello,

      I am trying to update to create a flow chart to check the status of lead after 1 week, and if for example still not interested, it will will count once and then transfer to another assigned user. The main point is I want to get the number of times it passes through transfer, and update the description accordingly..

      This is what I tried:

      // Increment the number of count
      $count = 0;
      $NCount = $count++

      //Update the notes
      ifThen(
      $Ncount > 0,
      record\update(
      'Opportunity',
      'description',
      'It is transferred '+ $Ncount +' times'
      );
      );


      But it doesn't seem to work..here I am trying to increase the counter, and since it checks an opportunity, then update the description with number of times it goes through this task.

      I appreciate if you could help me!

      Thanks in advance!
      Judy
      you might consider a Job to do it, if the lead assigned status == "Not Interested" then increment the count (Job could be schedule on weekly basis). BPM also could do the job you just need the right flowchart.

      I am not sure if this related to lead or opportunity?

      Comment


      • jd13579
        jd13579 commented
        Editing a comment
        Hi,

        This was for an opportunity. It is better to be in the BPM, because it has to count up to 4 times.
    Working...
    X