Choose Language Hide Translation Bar
Community Member

How to search and add new column with formula (loop)



I am trying to write a script for auto_calculation. I have one raw data table and one calculation table. The thing I want to do is to search the column name in the raw data table and then follow  the formula (expression) in calculation table to add new column in original raw table. The question now I am struggling is (1) How to search original raw data table (2) How to add the new column and determine the formula (3) The sequence is matter, need to follow the row sequence in calculation table since there are some new columns will use former new column.  Thank you all.Original_table.JPGOriginal raw data table and calculation tablenew_table.JPGThe new data table I want to generate by using script





0 Kudos
Community Trekker

Re: How to search and add new column with formula (loop)

             I have looked through what you are trying to achieve, In general, it might be easier to achieve what you want if your raw data table i.e. table 1 and calculation table i.e. table with formulae have a common column. If there is a common column or logic to follow, it would be easier to achieve what you are after. 

             Now, looking through the raw data if you want to use column names such as "Coffee" for reference, given the way the data you have shared is setup, you will need to customize for each column which may not be the most effective solution. 


            Is it possible for you to take a step back and provide a little more context around your data and what you want to achieve ? It may be easier to achieve ..

0 Kudos