Tinderbox Forum

.dot operators problem

Hey, friends, do any guys know how to start with dot operator, especially for uppercase and lowercase. I followed the instruction to set the code in my note, but nothing happened, I don’t know where to find the result. If it is not convenient, please give me some detail instructions.

This is hard to answer as it would help to know what you were trying to do and how you intuit the codes work. At simplest they are just like existing actions. So, format() and .format() do the same thing, but dot operators can be chained allowing a single action expression to do multiple tasks.

A key basic point is you still need to store the output:


should give you the character length of the value of $MyString, i.e. a number, but you need to collect the output. so:

$MyNumber = $Mystring.size;

The dot operation most likely to trip you is .replace. It seems natural to write:


When actually you need to write:


In order the $Text ends up being altered.

Does that help?

Are you putting the code (e.g., as @mwra explained) in the text body of the note? Nothing will happen if you do that.

The code is intended for use in Stamps, or Agent Actions, or Rules, etc.

Dear PaulWalters, I think the err was happened in where I put the code as you said in “text” column, so there was no result produced. Thanks for your help. Now I can amend the code to the right place.

After I put the code to where PaulWalters said, and use the way you offered to rewrite the code, it certainly works. Thanks for your help.