Set value in rows from action in another table

I have a production scheduling app where I am trying to schedule and execute production. This involves copying rows from a Formulation table for a specified Item to be produced. Here is the basic flow I am trying to achieve:

Table: Schedule

--> User selects row and then selects action "Stage for Production"

Stage for Production Action does the following:

1. Take the value for Formulation (ref) on the Schedule Table, pastes it into a temporary column called "Schedule ID" on the Formulation table

2. Multiple rows from Formulation table are pasted to Schedule Details table, including ref to the Schedule row (from the temporary column)

I have the action figured out to be able to copy the rows from the Formulation table to the Schedule Details table, but I cannot figure out how to paste in the Schedule ID into the temporary column so that it copies over as well, creating the linkage to the original Schedule ID.

Any thoughts or suggestions would be much appreciated!

 

0 11 294
11 REPLIES 11

Of your ultimate goal is to create new rows, you already have an action type that does it without the need of a temporary column. 

That's right. But it's copying rows from table 1 to table 2. There is a third table involved, which is where the Schedule ID needs to come from. I'm sure there might be a better way than using a temporary column in table 1.

Perhaps you could share the columns of the three table and give an example, we could help better with a suggestion.

Great idea. Here is a quick example showing how the tables should relate to one another, the overall process flow, and why we need to do this. The piece I am missing is how to get the Schedule ID posted to the child table. 

Appsheet - Schedule and Formulation Example.jpg

If the only thing your missing is the Schedule ID to be passed, you could simply pass it to the Formulation table by creating either a virtual or a real collumn that holds the value, then set Show_if to false, this way you can pass it to the child easily. You could also Use a SELECT() expression, but you would need to have mutliple identifer that isolate the exact row you are looking for, like dates,users, etc...

Are you trying to edit an existing row or modifiy it ?

Thanks. Where / how would I pass the value of Schedule ID to the Formulation table?

I'm trying to modify the existing Formulation row to have the Schedule ID from the row being staged at that time. Presumably, as we use the same Formula over and over again, that value will change the next time we stage a scheduled production row using the same formula. Then, that schedule ID would be passed onto the Schedule Item Detail table with the other Formulation table for the selected rows.

The link I gave you explain the process with images. Please read it. Thanks.

I see, thanks. I would do that with INPUT(). I use it frequently in my bots and it functions correctly. 

INPUT() - AppSheet Help

Thanks. Where would you put this? Does it go in a separate step in the bot, or a separate action? Something else?

What do you mean but Temporary collumn? You mean a virtual one?

Also, are you trying to create a new collumn in the "Formulation Table" or are you modifying existing ones ?

Top Labels in this Space