User-error: Not in table data field
The following table
#+BEGIN: clocktable :maxlevel 3 :tcolumns 4 :scope file :block 2015-6 :narrow 60
| Headline | Time | | |
|--------------+--------+------+------|
| *Total time* | *3:57* | | |
|--------------+--------+------+------|
| Tasks | 3:57 | | |
| 1 | | 3:57 | |
| 2 | | | 3:57 |
#+TBLFM: @3$5..@>$5=vsum($2..$4)*100
gives me
user-error: Not in table data field
where it should add the total of all the previous columns to the new column and multiply them by 100. Via http://notes.secretsauce.net/notes/2014/10/01_org-mode-for-invoices.html
I see two solutions: a) add the command in TBLFM
to add an extra column b) do the tactic of generating an extra column, but I don't know how.
+3
source to share
1 answer
Here's a quick hack that can be linked to a key that adds an extra column if needed and then recalculates:
(defun maybe-add-column-and-update ()
(interactive)
(save-excursion
(end-of-line)
(if (= (org-table-current-column) 5)
(let ((org-table-fix-formulas-confirm
(lambda (arg) nil)))
(org-table-insert-column)))
(org-table-recalculate 'iterate)))
+4
source to share