I wanna an addtion equation for the google script

i wanna an addtion equation for the google script
here are my equations for reading and deleting data

so i wanna that equation if it can be

so when the customer press join so the sheet will add his name and num and his num people added to the box by him will be added to the exisited no people in the sheet
and the viceversa when he cancel, his data only will be removred and his no people type will be substacted

You should have found Create and Update functions where you found your existing script ?

If not see here for ideas

i couldn't find it yet
this is the update code
//UPDATE SINGLE RECORD
else if (e.parameter.func == "Update") {
var ss = SpreadsheetApp.getActive();
var sh = ss.getSheets()[0];
var data = [ [ e.parameter.name, e.parameter.phone ] ];
sh.getRange("B"+(parseInt(e.parameter.id)+1)+":C"+(parseInt(e.parameter.id)+1)).setValues(data);
return ContentService.createTextOutput("Success");
}

i wanna adjust it to add new cells in the row not just updating

  1. Set up your spreadsheet with the extra columns
  2. Setup your blocks to send the extra data
  3. Setup your create/update script to accept parameters for the extra columns

can i make geenral text boxes so to not to make at leat about 6 new textboxes
forexample,
customer 1 name& number
customer 1 location
customer 2name& number
customer 2location
so to not to make 6 text boxes i wanna make a text box so any additional customer can fill and not affectiong on the prefilled other addional customers?

It sounds like you want to put all your customer details into one cell/parameter.

You can do this and either rely on the user following a strict pattern of entry, or provide a customer entry dialog that allows the user to add customers to a list, which is then reflected in a single textbox and can be sent as a single parameter to your spreadsheet.

As csv text:

As AI2 List/ JSON array:

image

image

thanks so much but its getting error when picking the listview
the previous additional customer data is being shown in the list view like that

so i wanna when the second additional customer picking the list view and adding his data so the list view will be shown two additional data like that


let me make a quick view its about to collect customers travelers numbers
the main customer ordered his request and i made a big dhashboard listview having all customers orders so when the new customer see that list view elements he can pick and join forexample:
the first additional customer :
when he mark the check box and added the num of join that num will be added to the no of travelers orders so if the orders no of people is 2
and the addional customer added in the spinner a number for example 1
so in the list view the no of people will be 3
and the additional customer data will be added as you showed me


so when the second additonal customer make the same join his data will be added after the additional one like that

i wanna make that as i wanna collect the num of travelers for each car whatever the max will be 7 for the van or 14 for the micro-bus or 4 for the taxi

i hope you get me as its my final step in my project

did you get me now by my app screen?

OK, what I understand is that each customer / app user needs to be able to add themselves to that list in their app ?

yes after the main customer make the orders
all orders will be collected in a main listview
so if additional customers wants to join
the no of people will be = the existed + the new no of people will be added by the addional
and in the below of the listview selection will add the customer name,number and location so on
so if a second customer made these steps will be listview selection
the main orders
no of people updated= main no of people+ no of people1= no of people 2 so on
and the listview selection below
customer 1 name, num and location
customer 2 name, num and location
so on

so when the driver pick the list view after the no of people completed he can connect with them by num and location,
thats all

There are possible collision issues with this, for example if two customers try to add their details at the same time. You can lock the spreadsheet while one user is adding their details, but you would then need to handle the other user who cannot add their details because of the lock.

customers will not add anything, their num and name and location will be added from their tinydb, they will just add the num of people and press join

If you have better ideas so lets share it with me, i wanna listen to your creativity in that.

You have confused me again

The four data will be added from the additional customers, 3 will be got from their tinydb name, num and location and the last one is the no people he will add
that four data will sent to the 4 textboxes and being added to the listview general and the same for the additoinal customer 2, 3 ,4 so on.
i wanna collect the cars people numbers until being full to call customers that the travel is ready

The potential issue is with the spreadsheet, not the blocks

yes i understand, i will move to plan b then with no need to show users all orders

Is this a packing problem done in parallel?

When I get the time, I will write a guide on how to use the lock service on google apps script which will help to avoid concurrent collisions when adding/appending data to a spreadsheet row/cell.