Quote:
Originally Posted by igorius
I have a strange problem with setting a custom column:
First problem: The program i used to set the reading status to 100 when #read gets set stopped working. I dont know why...
program: if test(check_yes_no('#read', 0, 0, 1), '#0000ff', '') then assign('#reading', 100) fi;
The template editor shows 100 when the #read is set and nothing when #read is not set or undefined.
But the field doesnt get updated anymore.
Second problem: Is it possible to set directly 2 different columns at the same time like
program: if test(check_yes_no('#read', 0, 0, 1), '#0000ff', '') then assign('#reading', 100) && assign ('#last_read', today()) fi;
Can i use the today() this way?
#read is yes/no
#reading is float
#last_read is date
|
Assuming I understand your question...
Your problem: assign() doesn't do what you think it does. It sets a local variable in a template. It does not set the value of a column. Nothing in the template language has ever changed values in columns.
You can do what you want with the Action Chains plugin, which can set columns to the result of a template.
If you are asking about a composite column (column made from other columns) then a) don't use assign, and b) you can't compute the value of two columns with one template.