Filter EnumList

Hi fellow AppSheeters!
I am struggling, and have been looking / trying various codes for a solid two hours and getting nowhere…
What I am trying to do is have:

  1. A list of clients, with their name as label and a site reference (done)
  2. An entry of an incident, with a site to be chosen (done) subsequently filtering an EnumList of clients by the site (where I am failing)

As far as I can see, this should work when placed in the ‘Valid If’ section:
[_THISROW].[Service Area] = [ServiceArea])

But, when I do that, the field disappears from the form to complete. If I just leave it as ‘Clients[ClientID]’ then all clients are returned, but we have 1,500 across 30 sites so that’s obviously not ideal!

I’m sure there’s something small that I’m missing, so would be very grateful for any help.

I believe you may wish to elaborate below

It sounds that you have parent child tables with referencing. What is the key in Clients table? And have you referenced it in the Incident table?

Could you elaborate why you mention enumlist , do you wish to select many clients at a time?


Hi @Suvrutt_Gurjar

The key in clients is ClientID, and it’s referenced as such:

I partly used EnumList as I found a similar setup in another app template, but I have also tried with List and Ref with no better results. In this particular field I may not need more than one client, but in others (e.g. witnesses) I will need that capability.

Thanks for helping out!

1 Like

Thank you. I believe your valid_if expression and set up looks good. Does the field disappear even after saving the field definition in the editor?

Also the field will appear in the form only after one of the service area options is selected.

1 Like

Hi @Suvrutt_Gurjar

You won’t believe it…or maybe you will! But it’s working now! Can’t see that I did anything different, but happy that it’s working now.

Thanks again…


Thank you for the update. Good to know it works the way you wish.

1 Like