2017년 4월 1일 토요일

App Inventor 2 - UPDATE SQL: Fusion table


I'm trying to update a single field in an fusion table using AppInventor. I have successfully obtained the rowid using a select query and stored this value and displayed in a label.
I then want to update a field for this row using the rowid obtained but the rowid is being stored as 'rowid 1001' and not just '1001'
Any suggestions on how I can just have the value of the rowid and not the column heading as well will be greatly appreciated.
Snippet = Do It Result: UPDATE SET 'Name'='Tim' WHERE ROWID = 'rowid 1001'
Many Thanks

--
The result you get back from the fusiontable is always a table in csv format, in your case it is a 1 column csv table which looks like this
rowid
1001
the first row is the header row, the second row is the rowid you are looking for.
Now just split the result using the split block at ∖n (new line) to get a list with 2 items. The rowid you are looking for is the second item in that list.
enter image description here
--

List viewer


I have a problem with the list viewer. I want to change the elements shown in the list viewer depending on the element selected in a spinner. The problem is: for example if I select an item from the list picker that shows 3 elements in the list viewer and then I select another item from the list picker that shows 2 elements, the third element remains on the third row of the list viewer. I use more lists, each one contains a non-specified number of elements. Whenever I choose an item from the list picker I set the list viewer's elements to the elements contained in one of the lists I created before. Can you help me please ?

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

-- 




--
I notice in image4.png that you have a for loop ranging from 0 to elements by 1.
Lists in AI2 have indices starting at 1, not 0.

This might be giving you an extra element.

Try starting from 1.

--
Could you post the .aia and enough screen shots to recreate the problem?

--
Likewise with img4, you're adding blank items to your list "listaprovvisoria" which you're then setting as your elements, but then you immediately set the elements to the selection of the spinner, so your list is worthless.

Also, you don't need to use two notifiers.  Just set the right text of each event and use tests in the "After" events to see the response and act upon it.

--

Tinywebdb and multi "tag"


I can not save data in tinywebdb when I select "dati21". I wish that every time that I choose from the spinner 12 or 21, the data appears on the listview ... someone please help me




--
Something's missing in your blocks.

Where's the event block that catches the data when TinyWebDB responds?

Don't expect an instantaneous response from TinyWebDB.

--
Thk's for your answer ...ok i solved .could you help me by placing the blocks to bring up the list in listview ??? I can not I'm going crazy ??? i would like to see the full list in list view when i click the button aggiungi OR when i selected the spinner selection....

-- 
There's something fishy here.

You have multiple TinyDBs?

They are all just different names for the same, one and only TinyDB.
Don't expect different data under the same tag in different TinyDBs.

Change them all to TinyDb1, and delete the impostors.

--
It's not clear what you are trying to accomplish, and why you need TinyWebDB.

It looks like you are using visual components and TinyWebDB for short term data,
which is usually kept in global variables, and in lists of lists.

Please see the TinyDB samples at my FAQ 
for how to work with multi-part data and long term storage.

--

AppInventor2 pdf file with activityStarter from appinventor start tutorial


Small simples does where you can start with the appinventor app pdf files.testet with a Samsung.

https://www.youtube.com/watch?v=2-OOj67HV8w


Small simples does where you can start with the appinventor app pdf files.testet with a Samsung.

App Inventor 2 Whatsapp mit appinventor 2 Tutorial


Hi people here is a small do as you can call with an app inventor app whatsapp is tested with a samsung a lot of fun in the afterbasing.

https://www.youtube.com/watch?v=c4OdFpix6Lw




⦁ I have a grage since you know yes with the topic MIT App Inventor. I have finished Screen1, then much to me that I would like a login. So I created Screen2. Now the problem is that, of course, when the app opens, Scree1. What can I do to open the app directly Screen2 comes? I hope you or who else can help me there.


⦁  Hello Stay Jay ... when Screen1.initialize - do - call Screen2 __ (which you have so long no answer got - is here not an impoliteness but the loving thrust for self - help) ^ ^ now since AI2 of all age groups gladly used I want to give nen times TIP: Screen1 (in the BLOCKS window) - when Screen1.initialize - do - call Screen2. That was it and at the start he switches to Screen2. --- (for Beginner: opens Screen1 the Screen2 is closed without objection or error message ALWAYS the screen closed the next opened ---- data from Screen1 so keep and pass after Screen2 is ne other thing) cya dog

⦁ ⦁ Thank you, I werdstest would you still how to make it, which only at the 1. open the app a login comes, but then no more? I have a username and password, which everyone can use, but momentarily the login comes with each new opening of the app

⦁  Uiii ... uhm ... in the obrigen video I do not find a LOGIN ... therefore I go now from times You mean generally (correct me please if not) Ein Login .... spontaneously fall 3 methods one ... Of which I myself always always uses, if not really data should be made unrecognizable. 1.- sub-optimal: once log on at real switch on and either BackPressedTaste if pressed interg it so prog does not close. (If you are using the Home button from your app, it should open OPEN.) Bad choice ... but I would like to show you that there are always several possibilities. (If you want to use the app), you should use the following command: // If you want to use the app, Can even serve as memory medium 5 .-- actually number 2 = text file save, BUT encrypted .... AI2 has already for it already a finished command .... would but too far to fetch * fg ... hope that helps? Cya dog

⦁ ⦁ Hi Jay ... you were probably what was tired ... the simplest solution much for your / your probably not natural: just unpack all blocks in the backpack and in Screen2 ^^ sry; o) happy inventing dog

⦁ Could you please make a video by showing how to call with the Activity Starter Whatsapp, so as an app, and not just send a post?

⦁ Sorry that it took so long to the answer am at the time very much work but have a link for them where they can call pdf files I hope times I could help them a bissen
⦁ Could you give a guidance how to embed PDF files firmly?

⦁ Can you make a video, how can you put ads with app inventor 2? :-)



Saving Inputed info and selection and signature for waiver form


Hello so I've gone over everything and it's working all correctly. Basically I have a waiver form that they accept, and then they gotta input the typical name, address, phone #, etc. My question is I have a spinner with 6 selections and a signature pad they sign. Can someone please help me figure out how to save all this info and signature as an image. I'll need to access this info later to as I will be transferring it to a computer. Thank you. Sorry blocks confuse me more than anything.

--
you can save the signature with the Canvas.SaveAs block and all the info in a list and the list in one tag in TinyDB

first do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the
Ok this is my block set up so far. I have the .touched and .dragged for signature pad and then the other one is obviously for the list selection in the spinner. I couldn't find that block you were talking about and idk if this set up is even correct? It works when I test it on my tablet. If anyone could just provide a visual of the block set and how I would connect them it would be greatly appreciated. Thank you. I searched to and couldn't find anything and I did do trainings but for some reason this block thing messes me up.


--
as already said, first do some tutorials to learn the basics!
and see here: How to work with Lists by Saj

some remarks:
1. where is your Camera.AfterPicture event? you need it to get the path to the picture on sd card...
2. why do you close the screen after start taking a picture? does not make sense...
3. I would define the spinner Elements in Screen.Initialize event... it does not help to define them after picking an element from the spinner...

-- 

When i have a long screen and i work at the last item mit app inventor go up


Hi guys. I have a problem. I work on an app that ave a lot of label and textbox. My app is scrollable and when i would change an option of a object that is located at the bottom, when i have changed it the screen go up on the top. This is very troublesome when i should change a lot of object that are located on the bottom. What should i do?

--
I don't know if there is a way to stop this behavior.
My thought is to put a screenful of your controls in a screen arrangement with a MORE button for the user to view the next set of items.
The first set would then be hidden by setting its containing screen arrangement component to visible false.
Then next set's screen arrangement can be set to visible true, etc.
Each section would have a MORE button (you can name it whatever you want to)
An added bonus of this method is that it allows you to put a label at the top of the group of controls to organize the information that the user is providing.
For example, the first group might be for a medical form...

Personal Information

Name
Address
Phone
Email

and the next group:

Medical History and current symptoms:

(check any  that apply)

Heart condition
Vertigo
Psoriasis
:

etc.

--
I think he talks about the behaviour of the designer, not the app itself.
I hqd this problem too, and it is realy annoying when you want to change 100 labels from fontsize 14 to 15....

--
@ Toni .... why are you using 100 labels?   You are not re-using Controls?   You can change the fonts of 100 labels ins seconds by using the Any component controls for labels program ably.   You might use the little button at the top of the Designer "Display Hidden components "  ..and temporarily hide some of the layouts on your screen, so you can move the object you want higher.  When you are done, change the status of the components you temporarily set to hidden back to showing?  Yes, moving components on a screen is sometimes frustrating...you do know you can use the Ctrl key plus your mouse wheel to zoom/unzoom the browser screen?   That sometimes helps when readjusting component positions.

@ Marco ... perhaps instead of using lots of labels you could use Lists, a ListVIew or Spinner or List Picker to view / use your data.

Android phones are not widescreen PC's, so developers need to experiment with the controls, layouts etc. to be able to present a lot of data in a small space.  Consider Scott's recommendations to place parts of your app in Vertical or Horizontal arrangements and variously hide or show (set Visible property to false or true) to manage your screens.

If something is not working for you; try a different screen arrangement or control.  Code well but code smart too.   ALL the apps here use a single screen (except Polyglot which uses two screens) but appear to use multiple screens.   Perhaps the techniques used https://appinventorforfun.wordpress.com/  might help you code frugally and get better displays?

Luck with your projects.   If you need advice with a specific problem, please post an image (jpg or png); doing so helps us understand your issue better and someone might have a solution.

--
OK. I had this too... If your labels are in arrangements, then set the arrangements Visible property to off (unchecked) and uncheck the checkbox above the upper left hand corner of the designer screen.

What you're experiencing is that the screen refreshes every time you make a change.  If your items are not in arrangements that you can make visible/inbvisible, you will be brought back up to the top of your screen every time you make a change to one that's lower than the visible screen.

--
I also find this behavior annoying and it would be nice if the visibility function in the designer did not directly echo the visibility control of an element.
I would like to make things visible / invisible in the designer without effecting the visibility of the element on the program side.

It would also be good if the user could resize the screen elements in the designer. I would prefer a wider components table and a taller main screen table.
Resize handles on the bottom of the main designer components would be really nice.

--

Components - App Inventor for Android


Component Reference

Component Types

This document describes the components you can use in App Inventor to build your apps.
Each component can have methods, events, and properties. Most properties can be changed by apps — these properties have blocks you can use to get and set the values. Some properties can't be changed by apps — these only have blocks you can use to get the values, not set them. In this document, read-only properties are shown in italics . A few properties are only available in the Designer.

LEGO and MINDSTORMS are registered trademarks of the LEGO Group.