跳到第一則未讀訊息

Yusuf Jk

未讀,
2014年10月2日 上午9:00:142014/10/2
收件者: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

未讀,
2014年10月2日 上午9:26:352014/10/2
收件者: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

未讀,
2014年10月2日 上午9:35:212014/10/2
收件者:mitappinv...@googlegroups.com
I did but the result is still same "error"

Taifun

未讀,
2014年10月2日 上午10:21:302014/10/2
收件者: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

未讀,
2014年10月2日 上午10:28:572014/10/2
收件者:mitappinv...@googlegroups.com
I have seen all your tutorials but cant find any solution please help
Capture.JPG
Capture1.JPG

Taifun

未讀,
2014年10月2日 上午11:05:062014/10/2
收件者: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

未讀,
2014年10月2日 上午11:13:312014/10/2
收件者: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

未讀,
2014年10月2日 下午5:44:572014/10/2
收件者: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

未讀,
2014年10月5日 清晨7:19:322014/10/5
收件者: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

未讀,
2014年10月5日 清晨7:20:242014/10/5
收件者:mitappinv...@googlegroups.com
Capture.JPG

Taifun

未讀,
2014年10月5日 上午9:14:202014/10/5
收件者:mitappinv...@googlegroups.com
please provide a screenshot incl Do it result of the join block
Taifun


Yusuf Jk

未讀,
2014年10月5日 上午9:49:502014/10/5
收件者: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

未讀,
2014年10月5日 上午10:21:022014/10/5
收件者: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

未讀,
2014年10月5日 上午10:40:582014/10/5
收件者: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

未讀,
2014年10月5日 上午11:49:352014/10/5
收件者: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

未讀,
2014年10月19日 凌晨3:59:582014/10/19
收件者: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

未讀,
2014年10月19日 上午9:40:292014/10/19
收件者:mitappinv...@googlegroups.com

Yusuf Jk

未讀,
2014年10月19日 上午9:48:052014/10/19
收件者:mitappinv...@googlegroups.com
I already tried finding solution on your website but i still couldn't find the way to do it.

Taifun

未讀,
2014年10月19日 上午9:51:422014/10/19
收件者:mitappinv...@googlegroups.com
you forgot the spaces before and after the table id
see also my red markers in the screenshot



Taifun

Yusuf Jk

未讀,
2014年10月20日 凌晨3:29:432014/10/20
收件者:mitappinv...@googlegroups.com
Finally, now i can access my database. this was possible only because of your help Taifun. Thanks alot :)
回覆所有人
回覆作者
轉寄
0 則新訊息