Google Sheets --> read/add/sort/delete/select

hello,
https://groups.google.com/forum/#!starred/mitappinventortest/LNAQSCExEtg

Can you end me full script codes?
I run it and runnig your codes. But I didnt’t with my scripts codes. Not connect.
Thanks

The example you link to contains the full script.

If you have changed this then you need to show your script code here. We may also need to see your blocks and your spreadsheet, because all three elements need to be correct for this to work.

Remember, if you make any changes to a google apps script, you have to update the script with a NEW version. The script should by “owned” by you, and accessible for “anyone, even anonymous”.


this my examle file, I write my simple İD. my id is different because we use random ID.

it is my script codes.

image

it is my codes in mit app inventor.

it is my scripts codes

image
normaly I changed my script address. can you say me we direct copy script address or add last sentence a codes.
thanks all answers

Try removing the first two functions from your script (don’t forget to update with new version)

image


Hi, Why does it show like this? I dont understand.

If you are running the script from the project editor then you are not providing any parameters. This is normal.

Thank you. I get it
How about this problem. How could I fix it?

What problem ?

If you have edited your script at all:

1 Open the script project
2 Go to Publish
3 Deploy as Web App
4 Project version: - select New from the dropdown
5 Execute the app as: your google account address (email)
6 Who has access to the app: Anyone, even anonymous
7 Press the Update button

You have to do this EVERY TIME you change your script

1 Like

Thank you for your detail instruction!
I'm trying to follow this person Hay Kel. His method look like more simple.
His script: code_AI2Sheet.txt (2.0 KB)
The app run as I want, but on list view. The time of record showing like this

. So How could I do to keep it as short as possible as I format on GG sheet (mm:hh dd/mm/yyyy)?
Looking forward to your response!

Hey Kel copied the script code from my site for their youtube videos, but did not account for the fact the the script was bound to a spreadsheet, or that the script auto-selected the first sheet in the spreadsheet. Some of their code in the app is therefore incorrect.

Google sheet date/time formats may just be for viewing only, which means any data returned to the app will provide the entire date number. You could format this using the text replacement blocks or the clock date/time formatting blocks, or entire dates/times as text in your google sheet (put an apostrophe in front before typing the date)

2 Likes

Hi TIM,
I cant find any document to support this thing. Could you show me how to build the blocks by uising replacment block?

sir I try my best but this system don't work, what's problem? please help me as soon as possible.
scrip not save, show 2 file error massage.

What system, show your blocks, script, sheet ?

Thank you. This system is work,
But create one more problem, no image show from google sheet on my MIT app. How Can I do this?

Exm: google drive or others Image link or any image put on my Google sheet, how I can show or view this image on Appinventor?

Show an Image from Google Drive in your AI2 app

If you are trying to display an image embedded in a google spreadsheet (insert image) then this will not work. You will need to place the image url in a cell on the same row.

Long discussion here:

An alternative is to show your google sheet directly in a webviewer using a special url that shows just the cells e.g.

https://docs.google.com/spreadsheets/d/<YOUR FILE ID>/preview

hello, I want to ask a small question. I just want to check whether the barcode exists. However, it appears on the first line during the query.

image

image

I do not believe there is an EXISTS function in the gviz query language. You would need to test the returned results to see if any records are returned, therefore confirming that the barcode exists.

Correct. .
The documentation is here Query Language Reference (Version 0.7)  |  Charts  |  Google for Developers

Taifun