Problem with uploading data in Airtable through Barcode scanner

Hi,

Kindly refer the Screenshot 1 and 2. Screenshot 2 in in continuation to Screenshot 1. I am scanning the quantity of material received and then adding it to the material received till yesterday. This will help me in identifying how much material is still pending (that is not covered in this blocks). All the values in the variables are getting correctly assigned and there is no error for any value upload in Airtable. However still, the Airtable Set cell block for column “Till Yday” doesn’t seems to work as the value in this column is not getting uploaded. Can any one help.


Regards
Shivam

1 Like

What is the value of each green error block? Set a label to each block and then you can see if Airtable is returning an error. You should always do this kind of error-checking in Thunkable.

Hi Tatiang,

I had done that and the label was returning “Undefined”. I presume that means no error.

Regards
Shivam

You have 2 issues and 1 problem.

First issue, is your trying to set and manipulate API key, BaseID and TableName every time. These works in the old components but are not consistent. If you still want to continue using old component then add an Airtable component for each table you want to work with.

Second issue is the way you have your code assumong that Thunlable will execute codes in sequential form which is not. Database operations are executed in asynchronous manner and there is not guarantee that Scan Details will finish then Till Yday will start.

The problem is you are assigning app variable Button5 a value at the start of your code and then use the after completion of one of the SetCell to change this value. You need to be sure that both values are numeric before using the result in any operation thereafter.

Hope this helps.

Hi Muneer,

Thank You for the reply. I am using the same Airtable table so not sure if I need to call additional Airtable component.
Even if the Scan Details and Till Yday don’t get updated sequentially that’s okay, as long as they get updated. Scan Details gets updated every time but Till Yday does not.
Lastly, the values in app variable Button5 are not numeric, as am taking sub strings as values here from the Barcode Scanner text. Any idea how can I convert the Barcode Sacnner text to numeric value.

Regards
Shivam

1 Like

Also, just to add to above, I passed the values of app variable Button5 to a label everytime a value is assigned to this variable and I was getting the desired value everytime but still that value is not getting passed to Till Yday cell.

Regards
Shivam

1 Like

The variable is holding the desired number but in a form of a string not a number.

The question is, the column in Airtable that should holds this value "Till Yday, is it of type text or numeric?

The other question is, are you sure that this is the exact name? The column names (and even table names) are case sensitive.

The third question (important one)
In your reply, you said you have only one table name.

But your code shows TWO Airtable components. Why is that?

Thank you sir one again for the reply. The “Till Yday” coulmn in Airtable is a Single Line Text type column. I have verified the Column name and its same as that in Airtable. Lastly, am using only one table i.e. Mat_New, however there are 2 Airtable components for 2 different columns in the same table. I am trying to provide values in the 2 different columns of the same table using Setcell. Really not sure whats going wrong, there is no error at all being shown. Would be really grateful if this can be solved.

1 Like

You are now using Right Swipe.

Can you use Left Swipe and use only the last block SetCell to update column Till Yday and choose a value directly by using the text block?

See what happens.

Are you checking directly in Airtable to see that the value has not changed or are you seeing it only in the app?
Please check both and see that the update has not taken place in the table by viewing the table directly from Airtable console.

Am checking the values in Airtable directly, everytime. Also, as suggested by you, I tried using the Left Swipe for the “Till Yday” Setcell only. It works fine when am providing a text block input directly. However, if I am providing a variable or even a number directly (through a Math block), its giving me following error - Trouble finding cell with row ***** and column “Till Yday”. Field “Till Yday” cannot accept the provided value.
So this means that “Till Yday” column is accepting Text but not a variable or a number input, even if the column type is Single Line Text. Not sure whats happening.
However, I tried changing the “Till Yday” column to Number type and then its working fine and am able to pass value to the “Till Yday” column. So I believe the root cause was NOT converting the “Till Yday” column to a number field. Thank You once again for your help.

Regards
Shivam

1 Like

Glad to know your issue is solved.

If your issue has been finally fixed please put up a solution. Just click on the comment and select Solution to mark it as the Solution or write your own comment with a simple solution and then mark it as solution.

1 Like