Zend certified PHP/Magento developer

How to implement field dependency in magento 2 ui component based on an external field value

I have 2 select fields in my form

  1. parent_company_id
  2. salesman_code

I need to show only the salesman which have the same entity value as the selected parent company option.
Since this is not a direct dependency, How can I implement?

Is there any possibility for getting the selected value of parent company ID in the salesman code’s model file?

I tried doing an Ajax call here, not worked.