Skip to main content
Solved

Multiselect Columns - String operations - Replace, Calculate, Sum?

  • March 13, 2023
  • 2 replies
  • 25 views

Forum|alt.badge.img+8

Hello,

I have a multiselect column "Products" with empty, single, or multiple strings of product name inside.

E.g. Xbox 360, PS4, etc...

I want to create a separate column's, based on data from another table, that would take into account that column.
1. Would calculate number of separate strings (Clear)
2. Would replace string with number (Price of that product) (Data of price is stored in another table)
3. Would calculate total sum of all those product prices. 

How would you recommend to achieve that, via Replace, Scripting or something else? And how? Would highly appreciate help!

Best answer by TheTimeSavingCo

If I were you I would use a linked field to another table instead of a multiselect field, linked to another table called "Products" where each record was a single product, inclusive of the price

> 1. Would calculate number of separate strings (Clear)
Doable via a "Count" field

> 2. Would replace string with number (Price of that product) (Data of price is stored in another table)
Doable via a "Lookup" field

3. Would calculate total sum of all those product prices.
Doable via a "Rollup" field with the formula `SUM(values)`

2 replies

TheTimeSavingCo
Forum|alt.badge.img+31
  • Brainy
  • 6414 replies
  • Answer
  • March 13, 2023

If I were you I would use a linked field to another table instead of a multiselect field, linked to another table called "Products" where each record was a single product, inclusive of the price

> 1. Would calculate number of separate strings (Clear)
Doable via a "Count" field

> 2. Would replace string with number (Price of that product) (Data of price is stored in another table)
Doable via a "Lookup" field

3. Would calculate total sum of all those product prices.
Doable via a "Rollup" field with the formula `SUM(values)`


Forum|alt.badge.img+8
  • Author
  • Known Participant
  • 22 replies
  • March 14, 2023

Thanks a lot, indeed I could achieve it simply via lookup.

I simply copied the Multiselect option to Lookup field, it has loaded all the prices, and with formula I could get the count and sum of the values!