Question

I am pretty new to App Inventor 2. I want to be able to import multiple rows (equal to or less than 10) with a single query to a fusion table.

Even if I managed to create the blocks correctly using INSERT INTO and following the syntax indicated by Google (INSERT INTO table_ID (Column1, Column2, Column3, Column4) VALUES "('value1','value2','value3','value4')"; INSERT INTO table_ID (Column1, Column2, Column3, Column4) VALUES "('value5','value6','value7','value8')"; etc.), this was only OK for less than 8 rows and then got an error -big url-.

So, I had to turn to the import method as indicated.

But, I have a hard time trying to configure the blocks.

I've seen the example here: http://puravidaapps.com/taifunFT2.php#import but I cannot understand what the procedures WebQuery.PostText and printResult are.

Furthermore, AI2 has no 'make text' and 'call _ text' blocks.

Finally, in this example the url seems to be a bit different from that indicated, here: https://developers.google.com/fusiontables/docs/v1/using#ImportingRowsIntoTables;

/fusiontables/docs/v1/.. vs /upload/fusiontables/v1/tables/.

Was it helpful?

Solution

You probably have seen the Note in the Inserting a Row chapter

Note: To insert a large number of rows, use the import method instead, which will be faster and more reliable than using many SQL INSERT statements.

However, if you are using the built in Fusiontable controls of App Inventor, you only can use the possibilites in working with rows but not in working with tables. Therefore you have to use the INSERT INTO statement.

Alternatively, and this is described in that link (btw. I'm the author of that page ;-)), you can also access fusiontables with the web component of App Inventor, and there you have more possibilities including the mentioned IMPORT ROWS

For more information how to get the source code of that example, just read the green box on the bottom of that page. Thank you.

And to learn about the differences between AI1 and AI2, see here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top