Rules for modifications - append?

Discussions about iCompta on macOS
Post Reply
drfrogsplat
Posts: 11
Joined: 03 October 2014, 04:40

Rules for modifications - append?

Post by drfrogsplat »

I just came across the 'Modify Comment' action in the rules, and was quite excited, because sometimes I want to add some extra info to a comment to remind me of things later on. For example, the word 'refund' on refunds, or a guess at the purpose, or '???' if I know that I'm going to need to look more closely at something.

I tried using the 'Modify Comment' action to append some text, but found it only supports replacing.

Code: Select all

[Modify comment] by replacing [the string | the regular expression] [$] with [ - refund]
Usually with regular expressions I can 'replace' '$' with text to effectively append it, but this doesn't seem to work (I've confirmed the rule matches, because it sets the 'refund' checkbox, but doesn't append my text). Same for '^' to 'replace' the start of the string.

Could you please confirm whether '$' or '^' are meant to work?

If there's a technical problem supporting ^ and $, then perhaps we could get options to [replace|prepend|append] in the rules instead? (probably simpler for non-regexers too!)

thanks!
User avatar
Angeman
Administrateur
Posts: 2302
Joined: 28 December 2008, 21:28
Location: Toulouse, France
Contact:

Re: Rules for modifications - append?

Post by Angeman »

You have to make an action like that : "Modify comment by replacing the regular expression (.*) with $1 - refund".
Post Reply