Problem in Lookup field in Sub Form

Problem in Lookup field in Sub Form

Hi

i am having a Sub Form in a main form.

The Lookup Field in Sub Form is baased on a value from the main form.SO while adding i dont have any issues the Lookup field works good
But if i try to edit that drop down field its showing all values in the LookUp rather than the fiterd value

Seeking a solution for that.

Code for Subform 

On Add Row

if (row.Order_No  ==  null)
{
    ord = (Order_Management[((Client_Name == input.Client_Name && Rate_Id == input.Rate_Id) && Order_Status == "Active")].ID).getall();
    row.Order_No:ui.add(ord);
}