Skip to first unread message

Yusuf Jk

unread,
Oct 2, 2014, 9:00:14 AM10/2/14
to mitappinv...@googlegroups.com
Hello there,
                   i am trying to create an inventory app with fusion tables. I have the api as well as the table id but i dont know what goes wrong and my query shows nothing but an error message. in the fusion tables db there are 3 columns ie. product, qty and price. a pic is attached below to understand what i want to do. please help me access the tables.

Thanks and regards
Capture.JPG

Taifun

unread,
Oct 2, 2014, 9:26:35 AM10/2/14
to mitappinv...@googlegroups.com
remove WHERE in the condition and use single quotes instead of double quotes
what do you get in the fusiontable got result event?
Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by Taifun.         



Yusuf Jk

unread,
Oct 2, 2014, 9:35:21 AM10/2/14
to mitappinv...@googlegroups.com
I did but the result is still same "error"

Taifun

unread,
Oct 2, 2014, 10:21:30 AM10/2/14
to mitappinv...@googlegroups.com
post again a screenshot of your relevant blocks and add a screenshot of the fusiontable got result event
also, what error exactly do you get?
see also 

Frequent Made Errors with Fusion Tables Fusiontables and how to fix them

Taifun

Yusuf Jk

unread,
Oct 2, 2014, 10:28:57 AM10/2/14
to mitappinv...@googlegroups.com
I have seen all your tutorials but cant find any solution please help
Capture.JPG
Capture1.JPG

Taifun

unread,
Oct 2, 2014, 11:05:06 AM10/2/14
to mitappinv...@googlegroups.com
which value do you get from the spinner?
did you download the rowids from the table first and then provide them in the spinner to be able to select one of them?
it would help to use Do it to see the condition of your statement
you said, you read all my tutorials, which means, you are familiar with Do it...
and: what error exactly do you get?
Taifun

Yusuf Jk

unread,
Oct 2, 2014, 11:13:31 AM10/2/14
to mitappinv...@googlegroups.com
The size value. which is disabled, it enables when the specific item is selected and when i click the do option it processes the query in the ai companion app but the last label which i have kept to show the qty from the fusion tables only shows the text "Error" nothing apart from that. and nothing i have downloaded just the spinners are hidden. 

Taifun

unread,
Oct 2, 2014, 5:44:57 PM10/2/14
to mitappinv...@googlegroups.com
as you can see from the screenshot, the query works
btw. it does not matter if you quotify the rowid or not...
probably you are using a non existing rowid or there does not exist the column Qty in your table?
note: column names are case sensitive...


however if I use a non existent column name, I get the error message 
400 Bad Request Invalid query: Column `x' does not exist




as you can see, "Do it" helps... you might want to provide a screenshot including Do it result...

Taifun

Yusuf Jk

unread,
Oct 5, 2014, 7:19:32 AM10/5/14
to mitappinv...@googlegroups.com
please find the attached pic and help me figure out where have i made the blunder.
P.S my fusion table is kept private (if that is the problem idk)

Yusuf Jk

unread,
Oct 5, 2014, 7:20:24 AM10/5/14
to mitappinv...@googlegroups.com
Capture.JPG

Taifun

unread,
Oct 5, 2014, 9:14:20 AM10/5/14
to mitappinv...@googlegroups.com
please provide a screenshot incl Do it result of the join block
Taifun


Yusuf Jk

unread,
Oct 5, 2014, 9:49:50 AM10/5/14
to mitappinv...@googlegroups.com
When i click on the do it option where you have mentioned it directly processes a request in the companion app and the result is "error" same thing :/

Enis

unread,
Oct 5, 2014, 10:21:02 AM10/5/14
to mitappinv...@googlegroups.com
That tells me that the info you're getting back from your spinner is incorrect, and you're passing that incorrect info to the call to get rows...

Taifun

unread,
Oct 5, 2014, 10:40:58 AM10/5/14
to mitappinv...@googlegroups.com
Right mouse click onto the join block, then select "Do it" should give you something else...
Remove the SendQuery block!
Taifun

Ketaki Rao

unread,
Oct 5, 2014, 11:49:35 AM10/5/14
to mitappinv...@googlegroups.com
In addition to Taifun's pointer to use single quotes instead of double, I'd also suggest the following steps to narrow it down. I went through the FusionTable pain myself last week and found that both queries and permissions are quite tricky. In my experience, the Error result is generally due to bad permissions.

For debug, I'd pick a simpler query just to get the access part working, and then you can always add back the list selection. So for e.g. just make the conditions block "Qty=1". Totally optional, of course, but it helped me stay focused on one issue at a time :)

For the permissions. I see you are using the API Key. Is this the Global API key in Developers Console or are you trying to authenticate users? I was unable to get the Global API key working without making the FusionTable Public, something I didn't want to do. If you don't need to authenticate users, I find the Service Account Authentication method to be a cleaner option. 
Here are the steps I followed to get it working.
- Developers Console: create a Service Account and download the generated key.
- AppInventor: Upload that key and set up the FusionTable to be accessed through the ServiceAccount. I've attached a picture of how to do this in Designer.
- FusionTable: share the FusionTable with the ServiceAccount Email address.

Good luck :)
FusionTableAccess.png

Yusuf Jk

unread,
Oct 19, 2014, 3:59:58 AM10/19/14
to mitappinv...@googlegroups.com
Okay, So after doing the pizza party tutorial i think i am on a right track now. but  i get a 400 parse error message i dont know what is wrong in the code. Please help
error.JPG
Screenshot_2014-10-19-13-13-00.png

Taifun

unread,
Oct 19, 2014, 9:40:29 AM10/19/14
to mitappinv...@googlegroups.com

Yusuf Jk

unread,
Oct 19, 2014, 9:48:05 AM10/19/14
to mitappinv...@googlegroups.com
I already tried finding solution on your website but i still couldn't find the way to do it.

Taifun

unread,
Oct 19, 2014, 9:51:42 AM10/19/14
to mitappinv...@googlegroups.com
you forgot the spaces before and after the table id
see also my red markers in the screenshot



Taifun

Yusuf Jk

unread,
Oct 20, 2014, 3:29:43 AM10/20/14
to mitappinv...@googlegroups.com
Finally, now i can access my database. this was possible only because of your help Taifun. Thanks alot :)
Reply all
Reply to author
Forward
0 new messages