Change data in a row by searching for a key in a list within a cell

I have an app that helps me track production runs of my product. I want to group multiple production runs into one batch. I have two tables/forms, one for the production runs and one for batches. When I fill out a batch form, I select multiple production run records that make up that batch. 
I want to assign the batch ID to the production runs that were used to make it up. How do I update the production runs table with the batch ID by looking in a cell on the batch table that has the information on which production runs make up that batch. This is the Production Runs table.This is the Production Runs table.This is the Batch table.This is the Batch table.

0 2 87
2 REPLIES 2

Welcome to the community!

You'd need three tables not two. One for the Production Runs, one of the Batches and another for Batch Details.

The Batches table would contain column that will hold fixed information about each the patch, such as the date, the customer, etc. 

The Batch Details table, would contain a ref column to the Batches tables, where you enable the option (is part of), and another to the Production Runs. 

In this way, when you fill out a Batch form, you'll add the relevant Batch Details as lines, each referencing the same Batch ID and a row from the Production Runs. Also, as a result, a new virtual column will appear in the Production Runs table, named "Related Batch Details" which the reverse reference that AppSheet will have created for you to show the related Batch Details row. 

You might not be interested though in showing every line in the related Batch Details and would simple prefer just having the list of Batch IDs. In this case, you can create a new column in the Production Runs table, with this formula:

UNIQUE([Related Batch Details][Batch ID])

_________

Data: The Essentials | AppSheet Help Center 

References Between Tables | AppSheet Help Center 

List Dereference | AppSheet Help Center 

Top Labels in this Space