Forum Discussion

manoharvankired's avatar
manoharvankired
Qrew Trainee
2 years ago

How can I update the "status" field in the parent table when there are multiple records with different statuses in the child table, such as "Started," "Inprogress," and "Hold"?

How can I update the "status" field in the parent table when there are multiple records with different statuses in the child table, such as "Started," "Inprogress," and "Hold"? I want to update the status in the parent table to "Hold" if there is at least one "Hold" record in the child table; otherwise, update the status to "Inprogress."



------------------------------
manohar vankireddy
------------------------------

2 Replies

  • You can make a summary field in the relationship. Click the box that says 'Whether any records exist' for your summary field, and add the filter 'Where status = On Hold'. So now you have a checkbox on the parent that tells you whether any children exist that are on hold.

    If the Status on your parent is a formula field, then you simply just say If the checkbox = true, the status is 'On Hold', else the status is 'In Progress'.

    If the Status on the parent is a manual entry field, you will need to use a pipeline. Trigger it off the child table and say, when the status of a child is changed, search for the parent and if the checkbox is true, set the parent status to on hold. If not, set it to in progress.



    ------------------------------
    Mike Tamoush
    ------------------------------
    • manoharvankired's avatar
      manoharvankired
      Qrew Trainee

      Thanks Mike,

      I have to create a Summary field in the relationship, where you obtain the combined text for the field Status.

      In this case, I called the field "Site Status."

      If(Contains([Site Status], "Hold"), "Hold",
      If(Contains([Site Status], "IN-progress") or (Contains([Site Status], "IN-progress") and Contains([Site Status], "Yet to Start")), "IN-progress",
      If(Contains([Site Status], "Yet to Start"), "Yet to Start", null
      )))




      ------------------------------
      manohar vankireddy
      ------------------------------