2017년 7월 2일 일요일

Fusion tables query shows an error always


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.


--
remove WHERE in the condition and use single quotes instead of double quotes
what do you get in the fusiontable got result event?

--
I did but the result is still same "error"

--
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 

--
I have seen all your tutorials but cant find any solution please help




--
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?

--
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. 

--
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...

--
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)

--

--
please provide a screenshot incl Do it result of the join block

--
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 :/

--
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...

--
Right mouse click onto the join block, then select "Do it" should give you something else...
Remove the SendQuery block!

--
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.

--
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



--
I already tried finding solution on your website but i still couldn't find the way to do it.

--
you forgot the spaces before and after the table id
see also my red markers in the screenshot

--
Finally, now i can access my database. this was possible only because of your help Taifun. Thanks alot :)

--

댓글 없음:

댓글 쓰기