Limited List Lookup Values

Is it possible to limit List Lookup selections within a subtable? For example, if I have options A, B, and C: A can only be selected once, B can be selected twice, and C can be selected an unlimited number of times.

Making sure I understand this correctly: You have a subtable with n rows, and Option A is limited to being chosen on a maximum of 1 of those rows (could be any row), Option B is limited to being chosen on a maximum of 2 of those rows (could be any row), and C has no limit.

If that is correct, the way I would enforce this would be through a validation logic block on save of the parent table. I don’t think it’s possible to enforce this when ‘defining the subtable’ as such.

1 Like

There would be another way of doing this that’s less preferable from a performance perspective: for each row in the subtable, add Field Value Changed logic to the list lookup field or Row Changed logic to the row as a whole, then loop the entries and count which lookup values occur a certain number of times.

I would only recommend that solution if the number of subtable records is expected to be small, but @ian.p’s solution is better and will validate just a single time on save or similar.

There is currently no tool to limit the values displayed in a list lookup by some set of requirements like you mention, but there are always Dependent list lookups that enable some values to be hidden and others shown.

It might technically also be possible to store a hidden field on your main table’s record for each list lookup value and slate the lookup to have dependent values based on each field, but it would be difficult to set up and lack any sort of readability or maintainability.