Filters for device page fields

Hello,

We were trying to filter device page fields but not having much luck. We tried doing something like this:

- label: '"WiFi Network Name"'
  parameter: VirtualParameters.WiFi-SSID
  filter: VirtualParameters.Hardware-Type = "MRR"

It doesn’t error out, but it still shows this field for devices where hardware-type is not MRR. Am I putting the filter parameter in the wrong place?

The filter property only works with the container component.

Thanks - Then how can parameters in the parameter-list be filtered? I have some parameters in the parameter-list that only apply to certain types of devices - I am unsure as to how to make those parameters only appear for those devices. Can I put a parameter-list inside a container somehow (or vice versa)?

Try this:

- label: '"WiFi Network Name"'
  parameter: VirtualParameters.WiFi-SSID
  filter: VirtualParameters.Hardware-Type = "MRR"
  type: "'container'"
  components:
    - type: "'parameter'"

This replaces the default component (i.e. parameter) that is used to render each individual value. It replaces it with a container component with which you can use the filter property. The parameter-list component will then skip any item that renders nothing.

I should’ve mentioned this solution in my previous answer but oddly enough it didn’t occur to me until you asked a direct how question :slight_smile:

1 Like