Filter a lookup field by another lookup field on a subform

Filter a lookup field by another lookup field on a subform

Hello all,

I am trying to filter a lookup field based on the selected value of another lookup field--both on the same subform. I tried storing the ID (of the first lookup value) on the form and on the subform but cannot access it.

If I store the ID on the form and set the filter to "ID == input.myID.tolong()", I get a runtime error. If I store the ID on the subform and set the filter to "ID == row.myID", it says "row is not defined". Right now, I have both fields unfiltered but, as I get more data, the more I'll want to have the filters.

My two lookups are to Employer and to Employee and would like to show only those Employees who work for the selected Employer. My problem is similar to https://help.zoho.com/portal/en/community/topic/nested-lookup-for-data-entry but, on his, it was used (and solved) on a form. I could set the second field to a dynamic picklist but need to populate other employee-specific fields so that's not an option.

Thoughts?

Thanks in advance.

Mike