Change status when conditions are true

Hello, I have a table with my inventory, which is grouped by the status ‘‘in-transit’’ ‘‘in recon’’ ‘‘retail ready’’.

When in recon, the mechanic, detailing and bodywork need to be completed. I set it up with a true/false for each, so that when the task is completed, I can toggle to done (true).

Is it possible to create a workflow that when all three are true, it automatically changes the status to ‘‘retail ready’’?

To accomplish this, you can add an action that sets status to “retail ready” and a workflow that triggers the action when all three of those values are set to true.

The action could look something like this:

The workflow could look something like this:

In that workflow, under “If this is true…” you can set the condition to the following expression, which will only be met when all three values are set to true:

and([mechanic], [detailing], [body work])
2 Likes

You are a genius !!

Ok something a little harder.

I created another data table for tasks. And when a task is created for that specific car, I want to update the status from In stock to in recon. Is this possible ?

2 Likes

Thank you :slight_smile:

This is harder! I appreciate the opportunity to learn something new.

I think, based on your reply, it sounds like you’ve already set up references between the tables. If you haven’t, though, you might want to start with the References Between Tables guide.

You’re going to need two actions and a workflow.

The first action is one that sets a car’s status to “recon” and should look something like this:

You may also want to change the options under “Appearance,” maybe set it to “Do not display” if you don’t want this action to be visible to users.

The second action is harder. For this one, you want an action on the tasks table, that looks up that task’s car record and runs your “set a car’s status to recon” action on it. That would look something like this:

The formula under “Referenced Rows” selects this task’s car record. The exact formula will depend on what your column names are. So for example:

select(
  Cars[name],
  [name] = [_THISROW].[car]
)

This selects the first argument, Cars[name], which is the key column of the Cars table. Instead of name you might have something like “car id”, “vin”, etc.

The second argument is the condition which must be met on the Cars table for the lookup to match. So in this case, it’s saying, give me the record where the column for Cars called name is the same as the car column on the Tasks table.

You can see the key column and the ref column I’m using in my schema below:

Finally, you need a workflow to trigger the second action on any added task record. It should look something like this:

and hey, look, it works!

2 Likes

Thank you so much for your reply, this is perfect !!!

1 Like