Record placeholder for non-tulip table?

We are loading all of our work orders into our App directly from Airtable. I want to scan a barcode (WO ID) and open the corresponding work order. The problem is I can’t make add a record or record placeholder because we are not using a tulip table. So the scanner always returns the error “cannot find matching record”

The trigger logic works as expected when you select a WO row from the table,

How do I ask tulip to load a record placeholder for an external table?

I think you have two options at present:

  1. Create a record in a Tulip table and feed it the data you have received from your external source… that way you can then interact with the local record, or

  2. Keep everything entirely in variables until you are done. This way no data is persisted anywhere until you are complete with whatever you want to do - assuming that eventually you want to feed back something to where the data originated from.

Hey Adam,

@sebme is correct - unfortunately, “Record Placeholders” are very specifically for Tulip Table Records alone.

However, what you’re describing seems reasonable to me. Technically, that Connector is outputting a list of rows with many columns - an Array of Objects. In Tulip Triggers, you can navigate and act on this list with Array functions, and likely can look up the number you need from that.

However, the easiest option here is definitely going to be using a second connector function - the Get Record API point.

Create a second connector function within your Airtable Connector. Make this one a “Get Record” request (as documented here). Then, add a trigger to your Tulip App to pass your barcode scan output into this Connector Function and directly look up whatever ID you’ve scanned. This will respond your record of choice into Tulip as an Array, and will function similar to the Table Record functionality you’re expecting.

Hope this helps!

Thanks @k.ober and @sebme ! I’m new to setting up connectors so creating a handoff table sounds like an easier way to go. I need to trigger that push of data though right? It cant happen automatically?, Order comes in via external system>Tulip Table is populated>Viewed in App

Howdy,

Hmm - you’re correct - if you could push that data through to a Table, we could get around this with no app involved (as Tulip Tables have their own API). To do this without an external script in e.g. Python, you’d need to do a loop, first popping a “record” from the list, placing each variable in the Table, and then repeating via a looper Custom Widget or something.

However, I think the simplest method here is going to be the second Connector Function. It’s essentially a duplicate of the “List Records” function we already have.

List Records” hits the URL https://api.airtable.com/v0/{baseId}/{tableIdOrName}.
Get Record” hits the URL https://api.airtable.com/v0/{baseId}/{tableIdOrName}/{recordId}.

Note that the only difference is that Get Record has the Record ID we want to look up on the end!

To add this as a Tulip input, we must:

  1. Duplicate/Clone the “List Records” Connector
  2. Get rid of anything after the question mark - maxRecords and view both just modify how the output looks. Also remove maxRecords as a Connector input.
  3. Add a new input to the Connector, call it recordId.
  4. Add onto the end of the URL: /$recordId$ . By surrounding it in dollar signs, the text should turn grey to indicate that it’s now a Tulip Input.

At the end, it should look like this:

Be sure to test out your new Connector with your inputs before going over to your App; I wouldn’t be surprised if there were some small necessary changes to the output (for example, like if the reply says “record” instead of “records”, we need to modify our Tulip Output.)

But that’s it! Now, if we ever want to look up a single record, we just have to run this function knowing both the tableName and the recordId of the thing we want to know.

Thanks Kyle!, Your instructions were great, I got the connector set up easily. But when I go to test it I get a “Table not found” error? I have no clue where to start when troubleshooting connectors.

What would the trigger logic look like?

Thank you for your help :pray:

Ah, interesting. We have three inputs here:

  1. baseId(hard-coded into the connector URL, but it’s still technically an “input” that’s unique to your Airtable instance)
  2. tableId(or Name)
  3. recordId

so one of these is wrong - based on your error, likely one of the first two aren’t what’s in your Airtable account. I would first confirm that each of these are indeed correct - one way to test would be to just remove that recordId at the end of your URL (so we just made another “List Records” connector, again). This way, we’re at least removing the possibility that your recordId is the source of the error.

Another way to test would be to remove those references to Tulip Inputs in your URL, and just hard-code all your IDs in there instead. Might be a bit easier to see if you have an extra backslash, or something.

In short- one of these three IDs aren’t what they are in Airtable. Good news is we don’t even need to get to triggers yet, we can test this all out in the Connector page. Let me know once you’ve tested these out!

Excellent!, so I ended up duplicating another Airtable connector that I knew was working, made the changes and I think we are in business! I can search by ID and return a single record. At least during testing of the connector.

So in the app, the barcode scanner step trigger scans and stores the record ID as a variable. Then we run the connector function, search by barcode ID and save as variable?

I’m not sure how to display that record, the variable I stored it to is not an available choice

1 Like

Great!

Yep - so now, you run the connector function and you get some outputs. (Configuring this is shown here). These are going to show up in your Trigger, and you need to point them to some variables in your app. (whether those outputs are Objects or single items is up to how you config your outputs in the Connector - I recommend Objects as they’re a bit cleaner to bundle all your info together into one variable assignment).
Note that the variables in your Tulip App need to have the same type as the outputs from your Connector (e.g. if your connector is spitting out an Integer, your variable in Tulip needs to also be an Integer. The easiest way to find this out is to “Create New Variable” from within the Trigger Editor, as then Tulip will know what kind of Connector Output you’re trying to make a variable for).

Pro tip - you don’t need to save the scan to a variable before passing it into the connector - you can pass “Device Output → Data” directly in as the input. Or, if you need to do some adjustments, use an Expression (e.g. Expression → LEFT(Device Output.data, 10) )

Overall, we’re avoiding Table Records here entirely - it’s all variables. (if you want to make a table record that dupes what we have in the variables too, then that’s fine. You’ll need a second trigger function, then, to

  1. make a new Record
  2. load that Record into your Record Placeholder
  3. put the Connector variables into said Placeholder).