AnsweredAssumed Answered

Calculating values in a Compound Results loop

Question asked by h2onet on Jun 15, 2020
Latest reply on Jun 19, 2020 by h2onet

As a quick background, I am but a lowly technician just learning the HPLC machine, but have a programming background and have been tasked with creating a custom template to avoid exporting the data into Excel and performing more calculations. 


In my template. I am using the "Compound Results" table.  I am repeating the table on "Sample_Name" and displaying a list of compounds, along with several custom fields.  I also have a field where I used an expression based on the sample values to create a value(% Per Weight).  My question is this:  How can I take that value from one row and add it to a value from another row, and repeat it for each sample?


Below is a screenshot of the report.  What I would like to do is to calculate two new values for each sample labeled "Potential CBD" and "Potential THC". 


To create Potential CBD, I need to perform this calculation: (CBDA "% Per Weight" * 0.877) + CBD "% Per Weight"


For Potential THC, is is the same calculation, but based on THC & THCA.


I need this value to repeat for each sample.


Thank you,




report screenshot