Pipeline rule to work on a field named with the at sign

Hello,

I try to create a pipeline rule but I encounter an issue because the field name contains the @ sign.
The rule is the following:

rule "test"
when
  has_field("@computed_date")
then
  let new_date = parse_date(to_string($message.@computed_date), "yyyy-MM-dd HH:mm:ss");
end

The error is:
token recognition error at: @

So I can’t save the rule.
I’ve tried to escape the @ with a backslash but it doesn’t work (the same error about @ and a second about ).

you can try putting quotes around the field name:

  let new_date = parse_date(to_string($message."@computed_date"), "yyyy-MM-dd HH:mm:ss");

Thank you it’s working with double quotes

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.