Google script update method

Can you in blocks mode? I hope you are committing mistake over there

And the common problems is how you are taking the row number only. If you wanna update selected cell or row , you need to use row index

1 Like

how about share screen aia?its to much block :see_no_evil:

If you have no probelm mean, pls carry on

1 Like

i really appriciate it

Are you Sharing the aia at here or in pm?

1 Like

Don’t use sku for var i because item sku 1, 2 and 3 are the same. Use unique item for id ex: date or location

1 Like

FOOD_MultiTools(2).aia (2.2 MB)

oke i think you know what i mean…so its possible to give 3 var or params at the same time?like if sku=sku,and exp= expiered and loc=location then just execute that data…or it imposibe?i mean var i must just select one between expire or location?

why not try?

You can try another way

  1. read data
  2. select the item to edit
  3. Find out the index
  4. update by index
  5. done

probably by index + 1 because js array is 0 based :wink:

1 Like

see your logic is totally confusing us… You are having expired data in Sheet3, upon screen initialize it loades and on long click you set to edit the data. Once user edits mean that data need to store in the sheet1 only na, or you want that data to be update in the sheet1?

pls clarify @Teguh_Sampurna

Are you wrongly added this data? because two rows with same data confusing… If you are using this pattern then certainly you cannot use update items.

1 Like

yeah its true like this, so i mean at the script code maybe probably or not use 2 or 3 var or parameter no just 1 var for plu only…if it is imposible,i think ad 1 colomn for ID for uniqe,so i will use var i at colomn ID.

so in sheet1, you want to store list of datas one by one?..

yes with first code…its change the data,but just update first item,even i edit second data with same name,its always edit the first item…

yups…because… in the product A have diffrent expired date, so it posible to unique the SKU…
Screen Cek_Expired will store to sheet expired one by one

pls come to private message. no need to continue here, else it will seems to be spamming the thread with plenty of messages.

1 Like

i have product A with ED Jan 24 2022, then A with ED May 21 2022 maybe etc…
but,if i edit item A with ED May 21 2022,it will edit item A with ED may 21 2022,not A with ED Jan 24 2022…i want like that

It can be solve with this method Google script update method - #20 by sugarlesscreator

1 Like

Also asked and answered in StackOverflow

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.