How can I filter for an enum payload field value in the frontend-config.js?

This works, where the field value is simple text:

type: "contracts",
      filter: [
        {
            field: "argument.cmrId",
            value: "LP-HU000002"
          }
      ],

I have a status field on the contract, which is an enum:

data Status = DRAFT | ISSUED | CANCELLED | (...)  deriving( Eq, Show) 

I couldn’t find out how to specify the field value. This doesn’t seem to work:

type: "contracts",
      filter: [
        {
            field: "argument.status",
            value: "DRAFT"
          }
      ],
1 Like

You need to match on the constructor similarly to variants:

       {
            field: "argument.status.__constructor",
            value: "DRAFT"
        }
2 Likes

Awesome, thank you!