Forum Discussion

GrahamHaskin's avatar
GrahamHaskin
Qrew Trainee
6 years ago

Button to start next task

I have a table that uses a "Copy Master & Detail Records" button to populate a pre-defined list of tasks in a child table. One field in that child table is a "Complete Task" button (formula-URL) that marks the task as complete (in the "Status" field, a
Text - Multiple Choice field) and populates the current date in the complete field.
The List of tasks is set up that only the first task has a Status of "In-Progress", the rest are listed as "Not Started".
My question is, can I get the "Complete Task" button to also change the status of the next task to "In-Progress"? The tasks are always done in the same order, but I don't want to set the status of all the tasks to In Progress up front, because then they would all be on the end user's to-do list, even though the majority of them couldn't be started.

  • I got this working for a client recently using an Automation.  Basically when a task is changed to completed, then trigger an Automation to scan for records which had the Trigger Record ID as a predecessor.

    But the predecessors for a record can be multiple record IDs.  So for example if the record ID that got completed as 12, then scanning for a field in other records for where the predecessor contains 12 is not good enough since there can be 212, or 2212 or 120 ...

    So I create this field to convert the predecessors to a text string.

    var text Pred = ToText([Predecessor]);
    var text PredOne =   PadLeft(Trim(Part($Pred,1,",")),6,"0");
    var text PredTwo =   PadLeft(Trim(Part($Pred,2,",")),6,"0");
    var text PredThree = PadLeft(Trim(Part($Pred,3,",")),6,"0");
    var text PredFour =  PadLeft(Trim(Part($Pred,4,",")),6,"0");
    var text PredFive =  PadLeft(Trim(Part($Pred,5,",")),6,"0");

    List("-",
    If($PredOne  <>"000000", $PredOne),
    If($PredTwo  <>"000000", $PredTwo),
    If($PredThree<>"000000", $PredThree),
    If($PredFour <>"000000", $PredFour),
    If($PredFive <>"000000", $PredFive)

    so it would read like


    000012-000013 if the preds were 12 and 13.

    Then I also create a field to zero pad the Record ID of the trigger record so it would appear like 000012

    Then the Automation would fire looking for where


    000012-000013 contains the value in the field 000012 of the trigger record and get a hit.