Apr 19, 2020 09:54 AM
I am new to JavaScript, and one of the reasons why I took learning it to use it on airtable.
Often I need to sum, count and averages of values in a table and hold the value in a block for a while for others to see. This can be done using existing blocks but one each for sum, count and average - which is tedious.
This script makes life easier in such cases. It lets user select the field and table, and even filter conditions before summing, counting and averaging them.
I am planning to add error handling. and warnings to this soon.
GitHub link is here: https://github.com/indrex/airtablesum
Sep 14, 2020 03:38 PM
Hey Indresh,
I hope you are fine.
I am trying to use the code you created but for some reason the column remains empty whenever I run the script.
I believe it’s related to this: let filterString = await input.textAsync(“Enter filter option”); // what values to filter with.
I’m not sure what it really means. Can you please explain it?
Hady
Sep 14, 2020 07:47 PM
It’s the value you want to filter by, example: if you have sales figures from different products and you want to show the sum for only one product, filter by that product name.
Sep 14, 2020 10:44 PM
Thanks for your reply. I removed the this line because I don’t want to filter by one product, for some reason the column is not filling up whenever I run the script.