I have amalgamated some datasets and now have a multitude of attributes, some of which are not relevant for all features (many more than in the below example 😕). I am looking for a way to filter the attributes in the popup using an Arcade expression. For example, referencing the table below, if a user selects a feature on a map and the value for the ‘Layer’ field is ‘A’, then display all attributes with ‘A_’ as the prefix. Similarly for all other values of ‘Layer’. So, for a feature selected which has a value of ‘B’ for the Layer attribute, the attributes ‘B_abc’ and ‘B_def’ would be shown in the popup.
Â
I feel this can be accomplished using Arcade, but I cannot get my head around how.
Â
Â
Layer | A_abc | A_def | B_abc | C_abc | B_def |
A | Xyzxyz | pqrs | Â | Â | Â |
B | Â | Â | Mnop | Â | Defgh |
A | Xyz | Vwx | Â | Â | Â |
C | Â | Â | Â | xyza | Â |
C | Â | Â | Â | pqrstu | Â |
B | Â | Â | pqrst | Â | Jkl |
Â
Thank you for any pointers.