How to limit picklist in a Subform record when editing

How to limit picklist in a Subform record when editing

The following code restricts picklist entries while adding a new record to a Subform, but when editing a record in a subform, how do I restrict picklist entries to the relevant ones?

  1.     Denominations
  2.     (
  3.         displayname  =  "12. Denominations Represented (Dénominations)"
  4.         type  =  grid
  5.         values  =  Denomination_Sub.ID
  6.         width = 200px
  7.         on add row
  8.         {
  9.             row.Country = input.Country;
  10.             denomlist  =  Denominations  [Country == input.Country] sort by  Denomination_Name ;
  11.             clear row.Denomination;
  12.             row.Denomination:ui.append(denomlist.Denomination_Name.getall());
  13.         }
  14.     )