I have a table on my application which has data that was drawn from a Google Sheet API. I want to do some calculations on this column and generate a new column with the calculated values.
I want to return 60 if the column value is greater than 12, and return value *5 if it is not.
Can you post an example of your data that the table displays? This should be able to be done with {{currentRow.column > 12?’60’:currentRow.column*5 }} in a custom column value field
with no luck. Now, all values are returning as 0. Any advice? Thank you again in advance. I've learned a lot just working with the script you provided.
try {{currentRow.column > 12?’60’:currentRow.column*5 || currentRow['Completed Tally'] == null?0:'')}}
Though I am not sure if you want to set 0 if null and nothing if not - also not sure if you wan't this conditional to be added to the other OR using it as an additional rule....
Just to clarify, I only want one of three outcomes. If the ['Completed Tally'] value is greater than 12, then 60, if it is less than 12, then the val*5, if it is null, then 0.
if you want to apply this logic into another column and show the original column data then in the other column, simply use the same code, but replace self with currentRow