Hi all, I’m trying to create an automation that will update a linked record field (which sometimes starts empty, sometimes starts with records already in it) based on whether a lookup field is not empty.
The original data I am using is sensitive so I created a mock base with the same structure. I have five tables that are all linked to each other, one each for Dishes, Restaurants, Menus, Customers, and Order Instances. There are three make-belief restaurants: Satchel’s, The Forest, and Hidden Agenda.
The automation I want to make is for the Customer table:
A customer can order dishes either as an individual dish or as part of a menu-set. Though each dish was designed by a Chef at one Restaurant (i.e. a Dish row is connected to Restaurant through Linked Record where only one can be selected), customers can order menu-sets consisting of dishes by different restaurants or place orders for individual dishes by different chefs.
I want to be able to link each customer to a restaurant. Right now, I am using look-up fields to get restaurant info from a customer’s menu-set order or individual dish order (so there is still no link between customer and restaurant). So in the Customer table there are 6 fields, 2-each for each restaurant, and all they do is not be empty if the restaurant in question appears in that row in Orders.
My thought is to build an automation where, if the fields “Satchel’s Individual Dishes” and “Satchel’s Menu Dishes” is not empty, the field titled Ordered From will be filled with “Satchel’s,” and so forth. In the screenshot above, Clothilde Marcos is an example of a customer where all the lookup fields are not empty, so my wish is for the automation to add all three restaurants linked records in the “Ordered From:” field. Likewise, whenever a new Order Instance record is made and the order details inputted affects the lookup fields in the Customer table, it should also APPEND a new Restaurant record (if the customer has never ordered a dish by that restaurant before) in the “Ordered From:” field.
Hope this makes sense, any help is appreciated!