Filter data based on an enum value

Filter data based on an enum value

This is an example of how you can use the FILTER() function in ER and check against an enum value.

This is done from the model mapping.

The first thing to do is to add the enum to the model mapping.

Then you can create a calculated field with the following formula
(replace myTable with your table). In this example, AddressType is the enum.

    FILTER(
        myTable,
        myTable.AddressType = AddressType.Sender)

Note: You can also filter on fields AND enums. Here's an example.

    FILTER(
        myTable,
        AND(myTable.ItemId = parentTable.ItemId,
        myTable.AddressType = AddressType.Sender))