Help

Limiting the time a record can be selected to one

1347 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Bernardo_Sosa_G
4 - Data Explorer
4 - Data Explorer

Hello,
I am creating a table containing the different machines at a factory and a table with the electrical panels’ names to associate each machine to its electrical panel. I’ve now successfully linked the machines and panels. I am now trying to create a panel schedule for each panel.

  • Is there a way to automatically link a table to other tables? (i.e: if I had 50 panels, it’s hard having to link 50 times)
  • Is there a way to make sure that you only select a record once? (i.e: The dryer is connected to positions/slots 1,2,3 of panel PA, I want to make sure that I cannot choose those records again)
  • Is there a way to prevent a record to be modified? (i.e: If a panel has 2 phases connected, I cannot connect a three phase motor)
1 Reply 1

Yes — but I’m not sure how best to illustrate as regards your application, as I’m not sure where your many-to-one relationship is. For that reason, I’ll make one up. :winking_face:

Let’s say I have 50 subpanels, with subpanels named SP01, SP02, on up through SP50. If my [Panel] record has a field called {Subpanels}, I could either do as you mentioned and click and link 50 [Subpanel] records manually, one at a time, or I could do this:

  1. Create a single-line text field I’ll call {Subpanel String}.
  2. Enter into this field the following:
    SP01,SP02,SP03,SP04SP49,SP50
    (Obviously, that means enter all 50 subpanel names, separated by commas.)
  3. Select that field, copy the value (Ctrl-C), select the {Subpanels} linked-record field, and paste (Ctrl-V) the copied value.

That will create links to all 50 subpanels or, if the records don’t exist, actually create 50 new [Subpanel] records linked to your [Panel] record.

You can’t prevent the link — Airtable currently has no way to enforce uniqueness — but you could include my data deduplication code to alert you if a record is mistakenly selected a second time.

Not really. However, in your case it sounds as if you could set up some error-alerting routines to flag impossible or dangerous errors (e.g.,

IF(
    AND(
        {Power} = '2-phase',
        OR(
            {Equipment} = '3-phase motor',
            {Equipment} = '3-phase something else'
            )
        ),
    '🔥 Phase mismatch!!!!'
    )

or something similar.