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

댓글 없음:

댓글 쓰기