Data viewer list to airtable

Hi, how do I create a row in airtable for every row in a list?

I scan a QR Code to get items for my list (which can be any number of items) then I want to write data back to airtable with additional data (this is from a seperate screen). I may be better off using a data list but not sure if this will help

In case a work around is best, I am trying to check out bikes and the process is,

  • scan bikes to add to list, autofill rental contract with bikes on list, once contract is signed then add bikes to rented out list with a start time and contract number.
    -then check in is: scan first bikes code which brings up all items associated with the same rental contract, and as each item is scanned it is removed from the list.

This shouldn’t be too hard to do. In fact, I would argue that Thunkable is uniquely designed for just this sort of app!

Can you clarify:

  1. When a user scans a QR code, is the QR scanner recording a text string such as “Mongoose” (or say, a serial #)? And would the user scan several bikes at one time to produce the list you mentioned?
  2. So therefore a user might scan three bikes and create the list {“Mongoose”,“Diamondback”,“Cannondale”}? And then the user fills out a single set of information that applies to all three bikes? Or do they fill out three sets of similar information?

when items are scanned a list is created as below (bike name and serial number from airtable)

then the data in the list is used in the next screen to fill out a contact (a pdf of which is emailed) as below

when the contract is submitted a unique code is created (and saved to the clipboard to be pasted into ChargeStripe for a credit card hold) I want to upload each item to a seperate row in airtable so I can later recall each item, with this unique code, separately. (up to a week later)

When you scan each QR code, use the Create Row block in the Data Sources drawer and add the QR result value(s) to the column(s) in AirTable.

It would look something like this (I’m using the Snap to Place interface so the exact blocks may be a little different):

This video shows something similar: See this video instead: How to Add Data to AirTable from Your Thunkable App - YouTube.

And actually, since all three (or however many) bikes will correspond to the same user, you might want to save a list to Airtable – if possible – or create a row for each bike as I’ve shown above but include a UserID or some other unique value so that you can go back and search for that user’s bikes/rows later.

I have that part sorted but I want to add the bikes from another screen from where they are scanned, and they are currently saved as a list variable

scanned here

then want to upload each item as new row from here (Currently all items are in one field)

If you have the bikes in a list, I’d consider converting the list to text and then storing that text in Airtable. I had taken this screenshot before you posted that but it may be helpful:

Just replace the three-item list I have with your List variable. It looks like maybe you’re already doing that.

thanks, however I have 34 bikes in 5 locations and in 3 months it will be another 14 bikes and another 10 locations. It needs to be a central database where I can manage the bikes.

One way I thought of (in the middle of the night :neutral_face:) is add the bikes to airtable in the first screen as they are scanned, with the unique code generated there, then use that code as a variable in the second screen to update all entries in airtable with that code (update would be time and confirmation the contract was signed)

@tatiang @muneer

I know this is a stupid question but how do I update “all” not just “in list find first/last occurrence”

1 Like

No stupid questions… we all had to start somewhere! :wink:

The first occurrence of item block returns an integer based on the position of the list item that matches. So if you had a list like {“orange”,“red”,“yellow”} and you got the first occurrence of “yellow” that block would return 3 since it’s the third position in the list.

Can you explain what you mean by “update all”? Are you trying to change the value of all list items? Or change the value of all cells in an Airtable column? Or something else…?

1 Like

I want to update every row that has a certain identifier.

Rows 6-8 were added in one screen, I then want to update them on another screen when a contract is signed. The number in the identifier column is saved as “app variable Unique Code” so it should be easy. I can share my project if it would help

1 Like

You can only do that using a loop. There is not a single block that will accomplish what you want.

It would be something like this

2 Likes

A loop as in, find first were identifier = variable AND name = null, update row, then rerun until no more instances? (there could be up to 20 instances)

just saw the screen shot, will try that

Thanks

1 Like

@muneer @tatiang

I got that part all sorted for the checkout process but now for the checkin I need to go back to updating every Airtable row that has an item mentioned in a variable list. Is there an easy way to do this or do i need to split up the list and work through each item separately?

1 Like

Can you please show example or give more details. I did not understand your question.

When I click on ‘Check In’ I want to update the airtable rows that are the same as my ‘Items to be returned’. The list varies in length. I want to put CI time in Airtable. Is there an easy way to UpdateRowNum with rowNum as a list (several rows). Or do I need to seperate the list variable and update each row separately.

1 Like

Unfortunately there is no “bulk update” feature or method in Thunkable nor in Airtable itself.

You will have to loop through the rows and update relevant rows matching your criteria.