Canvas switch case not working after first case

Hi,

I am trying to use switch cases in canvas kibana (7.14) but it's not working.
I tried to use the demo data with the following code:

demodata
| mapColumn "project_map"
  fn=${getCell "project" |
    switch
      {case if={compare eq to="kibana"} then="kibana"}
      {case if={compare eq to="elasticsearch"} then="elasticsearch"}
      {case if={compare eq to="beats"} then="beats"}
      default="other"
  }
| table
| render

and ended up with this result:
image

It appears that after the first case, nothing else works. I really need to map a column in the same way as shown here, so if there's an alternative I would really appreciate if you could share.

Thanks!

Hey @MTV,

I believe there was a bugfix related to this problem, I just cannot find the release note or Github issue for it. I'm able to reproduce the problem using a 7.14.0 cluster, but it's working correctly in 7.14.2 and 7.15.1.

So, I believe if you're able to upgrade, it will fix the issue.

Thanks
Brian

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