Google sheets collumns 1 till 10 becomes in glide an array

With “Choice” I can choose different products from a table by means of “radio buttons” (max 10).

In google sheets i made 10 collumn
s product 1 … product 10. In the glide sheet these 10 columns become an array column. When entering with “choice” and radio buttons I no longer see the array column, but I do see 10 product columns. How can I put the data in the columns the 10 or in the array?

If I go very quickly to the slide sheet I see the entry in the array. after a few seconds they are cleared.

Hi @Hans_Op_het_Roodt , how are you?

Your choice component applies to a column. Have you tried putting your x10 products in one column, with one product per row in that column?

I don’t know what GLIDES does. Does he put the chosen products in the GLIDES array or does he put them in the 10 rows of the google sheets.

The only option is product 1. (Name in the Google sheet). I don’t see the array -name, so I can’t choose it.

If you’re trying to create a choice component, the data that can be displayed are rows of data, not columns. If you’d like products 1-10 as options in a choice component, you should have a separate sheet for all Products, listed in a single column and use that as your data source for your choice component.

4 Likes

That’s correct. I have these in another sheet under products. I choose a number of products from this column. That works fine. But I can’t get them saved in another sheet as product 1, product 2, product 3 etc.

I think some screenshots will help explain things.

Are you submitting a form and trying to track which products are chosen?

1 Like



The options are obtained from the “product” column of the product sheet. you can choose multiple (max 10) products. These choices must then be stored in the sheet “deelmaaltijd” under the columns product 1 to product 10 (in the Google sheet) or the column product in the glide sheet.

That’s not how the multi-select works. When you use multi-select, the choices will be saved as a comma separated list in the target column. From your screen shots, it looks like your choice component is targeted at the ‘Product 1’ column, so all selections would be written to that column.

2 Likes

So I would have to make a separate sheet. There, save the choices separated by a comma. Then copy to product 1 to product 10. If possible.

Is there a reason why you need the choices written to separate columns?
What will you do with the values?

Yes, the choices have values ​​with which I calculate how many kcal, fat and protein a part meal provides.
See first part of the screendump, you see the column kcal and part of a next column fat.

Okay, if I understand correctly you should be able to do the following:

  • Write your multi-select choices to a single column, As already noted, this will give you a joined list of values.
  • Use a Split Text column to convert that list into an array.
  • Create a multi-relation column that joins the split text column to the product name column in your product sheet.
  • You can now use 3 Rollup Columns to get the sum of each of kcal, fat & protein respectively. Each rollup column will take the sum of the appropriate column in your Products table, via the relation created in the previous step.
3 Likes

I’m going to work on it. The extra column with the choice values ​​separated by a comma already works.

Thank you for your input. I’m a lot further now. Undoubtedly, new problems will arise. I hope to be able to use your knowledge again.

2 Likes

An amount that is different per row must now be linked to all products. This amount is necessary to calculate the actual kcal used.
How do I do that?

I can see that you have the Split Text column and the Relation column, but I don’t see any Rollup columns. Did you try that?

Darren.
I need to know the amount of product used first.
Only then can I calculate how many kCal it has for each product separately.
Formula is as follows:

(how much/per)*kcal

in this is:

how much = ? (so I still need to know)
Per = value from product sheet
kcal = value from product sheet

When I have calculated all values ​​separately, I can add them up (rolup).

I’m sorry, I don’t really understand.

In particular I don’t understand what “how much” is referring to. Can you try to explain this a bit more please?

how much explanation:

The number of kcal per 100 g is stated on the packaging of each product.

e.g. 67 kcal per 100g

for making a meal I use more or less than 100 g.

I weigh the product and assume it is 250 g.

Then I calculate the actual value of the kCal:

(250/100)*67=167.5 kCal.

Because I use a different amounts (how much) with every meal, I also get different results.