Question about Thunkable tutorial

Hi,

I was quite pleased to come across the tutorial on integrating Thunkable with Backendless! I have been doing the section that saves data to Backendless and have questions.

I have realised that the table is created on the fly if it does not already exist (great!!) but have realised that the data types for both name and age are strings and if I change the data type for age to INT the app fails. Shouldn’t I be able to create a table with any data type to integrate with the Thunkable side?

Also, if the age data type is a string how can queries like age>33 be done? Shouldn’t that only work with integers, decimals, money, etc.?

Thanks
Steve

Hi Steve,

If the data for age is sent as a string, the created column will have the string data type. However, if you send it as a number, the column should have a numeric type (it will be either INT or DOUBLE).

Yes. It is recommended to create your table before you start sending API requests to it.

String comparison does not work the same way as numeric comparison. Therefore, if age is declared a string (as the consequence of how Thunkable sends data), then the natural numeric comparisons will not work as you’d expect.

Regards,
Mark

Hi Mark,

Ok, so in Thunkable I added 0 to the age input forcing it to be a number and the column as created as Double.

As far as the query is concerned, even though age is stored as a string the query worked. Not sure how but it did. Hmm.

Steve

If the column is created as Double, any data stored in that column will be numeric