Hi guys, I’m new to Coda, but from what I’ve seen it really looks like an amazing tool. I would like to build an automation that checks if a file has been uploaded to a row, and changes the status of the row if it has indeed been uploaded (i.e it only changes if the file cell isn’t empty). I’ve looked at Coda documentation but I didn’t find any “IfEmpty” formula, I’ve tried with the “IfBlank” formula but it didn’t work.
How would you guys do this ?
The formulas you’re looking for are isBlank() and isNotBlank()
You can either put the thing you’re wondering about inside the brackets (like Excel):
or use dot chaining (a bit more readable imo, especially in more complex formulas):
For the exact situation you’re describing, you probably don’t need an automation. You can just set a formula on the column you want to be affected.
For example, if you want a checkbox column called “File has been uploaded” to react to file uploads, and you have a column called “File Upload” that the fiels are being uploaded to, you can set a formula on the checkbox column of:
If( FileUpload.isNotBlank(), True, False)
…which will check the box (“True”) if the file upload column has something in it, and uncheck the box (“false”) otherwise.
[Yes, yes, everyone - this can be collapsed to the more efficient FileUpload.isNotBlank(), but I think it’s useful to understand how the If() formula works early on]
Hi Nick, thanks a lot for the answer ! I’ve indeed tried with the IsBlank/IsNotBlank formulas, but it didn’t work either. Each time I try to use IsBlank, the output is “wrong”, i.e it outputs “false” even though there is no file in the cell.
In the image below, you can see that the formula outputs “true”, whereas my CE column (which is my file column) is completely empty.
Am I doing something wrong ?
@guillaume_adragna, I believe part of your issue is that this needs to be evaluated on each row. The formula in your screenshot is evaluating a list of values, which may cause the IsNotBlank() function to not work as expected.
I have a similar automation that checks daily to see if a contract end date has passed or not, and if so, it marks the contract as expired.
Here’s my attempt to put the formula into English:
Filter the Missions 2023 overview table for rows that match the following criteria: the CE column is not blank AND the Status column is not equal to “File Uploaded” (that last part isn’t necessary, but will likely speed things up so that it’s not running ForEach on all the rows that have already had the Status set previously).
Now, For Each row returned by the above filter, set the Status field to “File Uploaded.”