Dynamic Picklist: Add to picklist dynamically not working

Dynamic Picklist: Add to picklist dynamically not working

I have a form where I am trying to add to a picklist dynamically.

Form: Terminal
Field:
  • Terminal Name
  • Company (Bi-directional relationship) (longlist)

Form: Company
Field:
  • Name
  • Terminal (Bi-directional relationship) (longlist)
When I use the code on another form called Order_Form:
  1. VDFCompany = Company [ID!=0 ];
  2. FilteredTerminals = Terminals [Company in VDFCompany.Company_Terminals];
  3. Terminals:ui.add(FilteredTerminals);

It works for other fields, but for one of my specific fields it does not work. Nothing populates the terminals field. I am not sure why. The application is already shared to support. Any help is much appreciated!