2017년 7월 29일 토요일

About Fusion Tables in MIT App Inventor 2


I am Indibar speaking. I have a doubt that how to use Fusion Tables component in MIT App Inventor 2? I went on App Inventor 2 tutorials and saw an app called "PizzyParty_MIT_2014". There I saw the component "Fusion Tables" used. I tried to link that program with my programming but it was not working. So can you help me about:

1) How to get the API Key for my table?
2) How to get the Table ID for my table?
3) How to get the Table URL for my table?

Also send a program about my doubt.

--
see the Pizza Party tutorial for a detailled descxription of the steps to be done Pizza Party with Fusion Tables for App Inventor 2
btw. alternatively you might want to use the service account method

--
Thank You. I want to ask another question on How to change the Font size and styles in Fusion Tables of MIT App Inventor 2? Eg: To change the height and width of the table, To change the Font size etc.

--
are you talking about displaying a fusiontable in the webviewer? as far as I know,  you can't change that style.
alternatively you can download your fusiontable (using a SELECT statement) and display it in App Inventor
here is an example, which gives loads of possibilities...

--
Yes I am talking about displaying fusiontables in the web viewer. In my project I tried to create a table in Google drives which contains 3 columns and 15 rows. When I tried to display that table in my web viewer it showed but the display was horrible. The three columns name is NAME, ADDRESS, LOCATION. The first input which I gave had uploaded from below. I am not able to understand that why the datas are getting uploaded form bottom to top. Why is it not getting uploaded from top to bottom? And second thing is the font sizes are displaying very big. Can I change the font size to small ? So help me on this problem.

--
what is your complete table URL?

--
My complete table url is : https://www.google.com/fusiontables/embedviz? viz=GVIZ&t=TABLE&q=select+col0%2C+col1%2C+col2+from+1mb4xICnbmLOJeMYtucgphNelqaANN_d2ljhCQTQu&containerId=googft-gviz-canvas

--

you can order your result by any column in ascending or descending order, example:


I just added +ORDER+BY+NAME+DESC after the tableid...

as already said, as far as I know,  you can't change that style.
alternatively you can download your fusiontable (using a SELECT statement) and display it in App Inventor
here is an example, which gives loads of possibilities...

--
Thank You very much. I got another problem while creating my app. The problem is that how can I get my rowid from my table? I want my rowid because when I click clear button it will clear only that row. So How can I do that? Please send this answer quickly because I have to submit this app to my teacher tomorrow.

--
just send a SELECT statement to the table like this
SELECT ROWID FROM <tableid> WHERE <your where condition> 
to get the row id

--
In my project I have inserted four buttons SAVE,UPDATE,REFRESH and CLEAR. So I want to know that when first time I press SAVE button, it gets saved but it is not uploading in my table. When I refresh the page second time it is showing in my table. Why is this happening? Second thing is how to update my whole table when I press the UPDATE button? Third thing is how to clear only that row on which the data is displayed when I click the clear button? Last thing is that when I click any two rows of my table it should go to Google maps and show the location of that point. So how is that possible? Please help me on this four problems. Also send some pictures.
--
when first time I press SAVE button, it gets saved but it is not uploading in my table
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

how to update my whole table when I press the UPDATE button?
do a search in the forum and see SQL Reference Documentation of the Fusion Tables API.
you have to update each row one by one
probably easier to delete the complete table and do an insert again 

Third thing is how to clear only that row on which the data is displayed when I click the clear button?
do a search in the forum and see SQL Reference Documentation of the Fusion Tables API

do it step by step first finish the first task and then think about the next 
don'T try to solve all poblems at the same time
later ask again concerning the last task

It does not look like you have used the forums yet, as a search using the search box above would have returned several threads about these topics.

Advice: Before posting, it's a good idea to search in this forum. Many others have likely run into problems similar to yours. How to search see screenshot.
I have send an attachment as you said for the app. It is PDF document. So it might help you.


--
Is there any error in my program I sent just few minutes back ago? If there is an error, please let me know. And why did you send this link "Frequently made errors with fusion tables" to me? I am not able to understand.

--
I don't know if there is a nerror
the link shows you how to debug your blocks and find problems yourself
also in case of error, I would display the result in the notifier, else how can you know, what kind of error happened?
use Do it to debug your blocks, see also tip 4 here 

--
Thank you for your answer taifun. I am asking this same question to Steve DJ. So please show this question to him and let me know the answer. Please do not mind. 

--
Taifun, this is a problem that I have in last few days - until 12th of Nov, creating P12 for android returned email address like this: xxxx@developer.gserviceaccount.com. From that day, DNS is changed to xxxx@dc4-2015.iam.gserviceaccount.com and Fusion table won't accept it. I've seen the tutorial on https://puravidaapps.com/fusionservice.php, but it's not working. When I want to share Fusion table with xxxx@dc4-2015.iam.gserviceaccount.com this happens
Any ideas?

--
@Katarina: obviously it does not make much sense, to notify a service account by email...
therefore you should uncheck the checkbox "Notify people by email"...
Taifun
PS: instead of hijacking another thread, for new questions start a new thread next time. Thank you.

--
Dearest Taifun, you've solved my problem! Thank you so much. 
For everything else - I'm guilty as charged! 
Should I delete my posts?

--
It's better to leave your posts and their answers up on the board,
for other people who might have a similar problem in the future.

--
I have a really important question to ask you because I really need help of you . The question is that How to choose a particular data from a row in fusiontables?
Eg: In my app I want to choose the GPS Location column from that fusion table and when I click that that particular block it should directly go to google maps and show that location.So how to do that? Please help me because I am creating this app for exhibition which will be held on 1st of December 2015 in my school. Can you please help me to give the answer by today? 

--
How to choose a particular data from a row in fusiontables?
send a select query to the table and get the result back in the fusiontables control got result event
then convert the result into a list and display it in a listpicker
after picking one of the items open Google Maps using the activity starter together with that GPS location

--
Once you had asked for my Table URL, so I gave my URL. My table contains total 39 or 36 rows. So can you decrease the row to only 8 rows? Whatever you suggested is fine but when I directly click on the location field it should go to google maps. So how to do that? Please suggest me on this problems.

--
My table contains total 39 or 36 rows. So can you decrease the row to only 8 rows?
you can filter your table

but when I directly click on the location field it should go to google maps
the webviewer can only display your table, you can't click onto something to trigger something else
therefore you will have to follow these steps
1. send a select query to the table and get the result back in the fusiontables control got result event
2. then convert the result into a list and display it in a listpicker after picking one of the items open Google Maps using the activity starter together with that GPS location

--
Is it possible to create links in fusiontables? I asked this question because I wanted to create a link in the location column so that when I click on that link, it will go to google maps and view the locations. So is that possible?

--
Is it possible to create links in fusiontables?
as already said, the webviewer can only display your table, you can't click onto something to trigger something else
therefore you will have to follow these steps
1. send a select query to the table and get the result back in the fusiontables control got result event
2. then convert the result into a list and display it in a listpicker after picking one of the items open Google Maps using the activity starter together with that GPS location

--
After thinking more about it, I'm not sure anymore...
Therefore just try it an let us know, what you find out

--
As you said in the last post "send a select query to the table and get the result back in the fusiontables control got result event then convert the result into a list and display it in a listpicker after picking one of the items open Google Maps using the activity starter together with that GPS location". I understood it but I am not able to write the code in mit app inventor 2. So please can you give me the code on what you said so that I could put it on my app. Please help me and give the code.

--
try something and if you got stuck, provide a screenshot of your relevant blocks
PS: sorry, currently I do not have any fish available for you

--
I am happy that I have solved my own problem myself. I have created a button called "VIEW". When I click on this button it will take the values from all the columns of fusion table and display it in an VIEW textbox which I have created later. This part of my program is working. Then I have created a listpicker. In that I wanted to take all the values from the VIEW textbox and display it the list of this format "NAME,ADDRESS,LOCATION","Name1,Address1,1.1111,2.2222". But when I tried it it is coming in serial. So why is this happening?


--
use the list from csv table block to convert the result into a list and assign that list to the listpicker.elements property

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

--
The solution which you told earlier worked perfect. Now I arose with another problem. I have created a string with only name and location with the curly brackets. Eg: (Name1 1.1111,2.2222). First I splited this string by using split at spaces block. It worked. It came like this "(1.1111,2.2222)". Then I again splited at comma using split text at block. It worked. It came like this "2.2222)". Now I came with a problem. The problem is that I wanted to split this string at ")" using split text at block. It didn't work. It came in this format "(2.2222)". So why is this happening? Is there any way so that I can only take the numeric value without the curly bracket?

--
learn how to work with lists
⦁ How to work with Lists by Saj
⦁ How to work with Lists and Lists of lists (pdf) by appinventor.org

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

--
Thanks for your answer. It really worked. I want to ask a general question, that I have a name Eg:Indibar Dutta as a string. Now I want to replace that space with underscore (_). Eg: Indibar_Dutta as a string. So how to do that?

--
for questions not related to the fusiontable control component, please start a new thread

--

댓글 없음:

댓글 쓰기