"-" in DisplayExpression

(Ralph Cramer) #1

Hi all,

I am experimenting a little bit with task paper export from omnifocus and import of this export into tinderbox.

For this, I have created a simple agent to adapt the DisplayExpression containing only the characters of the task name before the first “@”. Doing this, it looks like Tinderbox has an issue with having DisplayExpression started with a “-” as first character.

Having the following agent running
var addPOS(2); addPOS=$Name.find("@"); $DisplayExpression=$Name.substr(0,addPOS)

is generating the following task list


Changing it to

everything looks like expected, but missing the “-” as first character

Verabredung ausmachen
Agile User Group

Because I am a little bit confused because of this behavior, it would be great to get some idea of the mistake I have done here.


(eastgate) #2

The display expression is an expression – a formula that Tinderbox evaluates to compute the display name. Thus, if the display expression was


your display nam would be


In your case, the display expression


might be exactly what you want.

(Ralph Cramer) #3

Thanks, but addPOS will contain the number of the first occurrence of “@” in $Name.
Correct ?

$Name is “-Vertrieb @parallel(true)” => addPOS value is 11

Now, I want to set the first 10 characters of $Name as $DisplayExpression. So, I tried to use substr(0,$addPOS-1)

Thanks for any help.

(Ralph Cramer) #4

Solved. I have found the correct way setting the formula in " " in the agent

addPOS=$Name.find("@"); $DisplayExpression=“substr($Name,0,$addPOS-1)”

Thanks for our hint!

(Mark Anderson) #5

Surely, if the first expression uses an attribute ‘addPOPS’ then it should really be:


In current syntax, I think the expression would be:


Presuming $addPOS is a number-type attribute holding the .find() match position, we can move some calculation of the display expression which is generally a good thing:


(eastgate) #6

Then your display expression should be


If you set this as an action, then


(Ralph Cramer) #7

Thanks Mark. Important lessons learned was the usage of the hyphen in the expression.

(Ralph Cramer) #8

Thanks Mark! Tried it in a new file and it worked. Maybe something was not correctly initialised in the other tbx.