Alexander Adolf
unread,Apr 7, 2025, 6:20:20 PMApr 7Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hle...@googlegroups.com
Hello,
I am scratching my head about a CSV import question. The CSV has
optional fields. I would like to add tags with values to a transaction
if and when these optional fields are present in the CSV. The tag's
value is the value of the field in the CSV.
It it's for one optional field only, I could implement that with an `if`
in the rules file. But how to implement this with more than one optional
thing?
It would seem straightforward, if I could append something to an
existing field value:
fields ..., csv_tag_a, csv_tag_b, csv_tag_c
if %csv_tag_a .+
comment %comment tag_a:%csv_tag_a
Another approach could be to have something like local variables in the
rules file (_without_ defining tag_a_str in the fields directive):
if %csv_tag_a .+
tag_a_str tag_a:%csv_tag_a
comment %tag_a_str
But neither is possible currently.
Any other ideas how this could be implemented in a rules file?
Many thanks in advance and cheers,
--alexander