ABG
August 10, 2020, 7:12pm
17
Consider adding a new sheet to your design, with one row for each additional list item, identified by the key of its owner.
See the Order Item sheet in this Pizza Store sample, built for a (hopefully) upcoming Google Sheets component ...
I finished the code for my sample Sheets app, a Pizza Shop.
It turned out to be more than I bargained for, in scope.
Here's the source, and some screen shots ...
APizzaSheet.aia (37.7 KB)
[Capture New Order Entry start]
Initial order entry requires a name, and logs the time.
[Capture New Order Item selected but not yet added]
A List Picker lets you pick from the Menu, without duplication.
[Menu Sheet]
An Item level Add button completes the Add operation.
[Capture Order Item Data]
Or…
Having the list items in a separate sheet, lined up in the same column, allows you to do some SQL-like grouping and summation.
Exactly. So the second list will have empty items at the end? Too bad there is no block for removing empty list items .
TIMAI2
August 10, 2020, 7:22pm
19
But then you would have an improper csv/listofLists
If you attempted to iterate over a list of lists with different lengths, AI2 would complain....
ABG
August 10, 2020, 7:31pm
20
Suggested reading:
Data Normalization
thinh
October 8, 2021, 6:30am
21
I followed you but can't look up the data, please help
thinh
October 9, 2021, 2:20am
24
I tried but still can't run
thinh
October 9, 2021, 2:21am
25
Please check the code for me, and sheet and Sheet (in uppercase and lowercase) I have corrected but still not working
thinh
October 9, 2021, 2:23am
26
Please check the code for me, and sheet and Sheet (in uppercase and lowercase) I have corrected but still not working
TIMAI2
October 9, 2021, 9:41am
27
It appears that your sheet is called Sheet
but you are sending sheet1
in the blocks
1 Like
Try Sheet
, with a capital "S."
2 Likes
thinh
October 14, 2021, 1:02am
30
I make google sheet data query, i tried my best. however, it still does not work. Can anyone help me see if there is an error, the code, or do I need to install any additional google sheets add-ons?
TIMAI2
October 14, 2021, 8:07am
31
What query are you trying ?
Are you sure you have your google apps script published and your script url in your app is the same?
1 Like
thinh
October 15, 2021, 12:52am
32
I've fixed it many times, but still can't get the query. #ERROR announcement!
https://script.google.com/macros/s/AKfycbzAXLlAO0XBsq1Ms98hES9wuTO03i72yXJC-mMEFbZGdq_TwQ/exec
17KQxRL-HALgY9etgTqa_mo4jXDYu_dlxTMka8d3w2ec
thinh
October 15, 2021, 1:23am
33
i don't know where it went wrong this is my google sheet
Sheet1
First name,last name,Gender,Country,age
Hồ Phước ,Thịnh,Càn Giuộc,Long An,29
Nguyễn Quốc,Cường,Phường 6,TP Tân An,27
Nguyễn văn,Tiến,Châu Thành,Long An,37
Dương Hồng,Ngọc,Thạnh Lợi,Bến Lức,26
TIMAI2
October 15, 2021, 10:40am
34
There is a problem with your google apps script web app. It could be an issue with your locale. Try changing this line in your script:
var qry = '=query(' + rg + ';\"' + sql + '\";1)';
you will see I have replaced the ,
(commas) with ;
(semi-colons).
Remember to deploy your script to a new version
If you run this in your computer browser you will see the data is returned in a table:
https://docs.google.com/spreadsheets/d/17KQxRL-HALgY9etgTqa_mo4jXDYu_dlxTMka8d3w2ec/gviz/tq?tqx=out:html&tq=SELECT%20*
4 Likes
thinh
October 16, 2021, 1:45am
35
I did it, thank you so much
thinh
October 16, 2021, 7:54am
36
how can i view it as a table on the phone screen. by column on google sheet
TIMAI2
October 16, 2021, 9:11am
37
3 Likes