UPDATE PARENT TABLE STATUS USING RELATED TABLES

Hi all,

I just need help with updating the Parent Table Status…

Here is my very simple formula that i am currently stuck with…i do not know how to formulate the condition to “COMPLETED”

IFS(
(COUNT([Related PACKING PROGRESSs]))=0,
“NOT STARTED”,

(COUNT([Related PACKING PROGRESSs]))>0,
“IN PROGRESS”)

My condition for it to be Completed is that all Related Child Record to have a Status of "COMPLETED", “CLC STORAGE” and “SHIPPED”

Maybe

IF( NOT(IN(“Not Started”, [Related PACKING PROGRESSs][Status])), “Completed”, “Not Started”)

[Status] is status column name in the child table.

1 Like

Hi @Suvrutt_Gurjar

Yes, the column name in the Child Table is [Status].

I have tried your formula but it stayed in “IN PROGRESS” status.

Below photo should be “COMPLETED” as it meets the conditions that all the child table should either be “Completed”, “CLC Storage” & “Shipped”

Is the [Status] column in the parent a real column? The suggested expression will work for a VC. If you do not wish to capture a transitory status in real column and just for display of app users, you could use a VC for status column in the parent.

If [Status] column in the parent is real column, please use the approach of reference actions. A related sample app below. It changes child table based on parent table values. You can also implement in reverse direction- child to parent.

Reference Actions

1 Like

@Suvrutt_Gurjar

The different Status in Child Table are:

1.) “BPS Packing”

2.) “BPS Completed”

3.) “Crating in Progress”

4.) “Completed”

  1. ) “CLC Storage”

6.) “Shipped”

On the other hand, the Parent Table status are:
1.) Not Started

2.) In Progress

3.) Completed

I Set the parent table status as: IF the related table = 0 then its “Not Started”
I need to change the formula for “In Progress” to the criteria that IF any one of the related table has any of the below status then it should change to “In Progress”

1.) “BPS Packing”

2.) “BPS Completed”

3.) “Crating in Progress”

As for the “Completed” Status…the criteria should be that all the related table should have any of below status:

4.) “Completed”

  1. ) “CLC Storage”

6.) “Shipped”

Could you take a look at my latest post and respond?

1 Like

Hi @Suvrutt_Gurjar

Status in the Parent table is Virtual Column

1 Like

Please try

SWITCH([Status]),

ISBLANK([Related PACKING PROGRESSs][Status]),

“Not started”,

OR( CONTAINS([Related PACKING PROGRESSs][Status], “BPS”),

CONTAINS([Related PACKING PROGRESSs][Status], “Progress”)

),

“In Progress”,

“Completed”)

1 Like

Hi @Suvrutt_Gurjar ,

it’s showing error

Oops, there was an extra parenthesis by oversight. Please try

SWITCH([Status],

ISBLANK([Related PACKING PROGRESSs][Status]),

“Not started”,

OR( CONTAINS([Related PACKING PROGRESSs][Status], “BPS”),

CONTAINS([Related PACKING PROGRESSs][Status], “Progress”)

),

“In Progress”,

“Completed”)

1 Like

Everything is now Completed :scream: :grin:

:scream:

I believe you will need to revise your requirements or else it will always show “Completed”

If you have child records from all three status combinations , then it will revert to completed.

In the following image for example you have statuses from both 'Not Started" and “Completed”

2 Likes

@Suvrutt_Gurjar :disappointed_face:

is there no other way? These items go through all these stages…

The expressions will work based on logic. You could decide what one resulting status you want when various combinations of those child table statuses are there.

1 Like

I need to change the formula for **“In Progress”**to the criteria that IF any one of the related table has any of the below status then it should change to “In Progress”

1.) “BPS Packing”

2.) “BPS Completed”

3.) “Crating in Progress”

As for the “Completed” Status…the criteria should be that all the related table should have any of below status:

4.) “Completed”

  1. ) “CLC Storage”

6.) “Shipped”

I believe you are again sharing the same requirement. Will there be a parent record wherein some children are with Completed status and some with “Crating In Progress” for example? In that case what status you would need?

Anyway, could you give a try to modify the expression based on your latest requirement.

1 Like

I just need the child status table to be any of the 3 below status…then my parent table to be updated as COMPLETED but if below list is mixed with other status then it should still remain IN PROGRESS

4.) “Completed”

  1. ) “CLC Storage”

6.) “Shipped”

Please try

SWITCH([Status],

ISBLANK([Related PACKING PROGRESSs]**[**Status]- LIST(“Completed”, “CLC Storage”, “Shipped”)) ,

“Completed”,

“In Progress”

)

or the below expression

IF ( ISBLANK([Related PACKING PROGRESSs]**[**Status]- LIST(“Completed”, “CLC Storage”, “Shipped”)) ,

“Completed”,

“In Progress”

)

1 Like

I have tried both and below are the results:

For the Switch Formula – it doesn’t change to Completed even when all the child record status is completed

For the IF formula, the Parent table status is Completed even when there is no Child record yet.

Please try

IF (

AND(ISNOTBLANK([Related PACKING PROGRESSs]**[Status]), ISBLANK([Related PACKING PROGRESSs][**Status]- LIST(“Completed”, “CLC Storage”, “Shipped”))) ,

“Completed”,

“In Progress”

)

1 Like