Execute query rule in dropdown from UI values

Hello, 

I am trying to populate a dropdown by executing a query rule that is based on a CDT. I would need UI values to be passed as parameters to the query rule and populate dropdown dynamically when the user input value changes.  Issue is the value does not change when passed to query rule as a parameter and seems to take the original value only. 

Below is the code that I got so far: 

a!textField(
label: "Mfg Org",
labelPosition: "ADJACENT",
value: ri!expediteline.item_mfg_org_code,
saveInto: {
a!save(
local!mfgShipMethods,rule!EXP_GetMfgShipMethodsByOrg(local!itemMfgOrgCode,if(isnull(ri!expediteline.mfg_source_org_code_2),
if(ri!expediteline.mfg_source_org_code=local!itemMfgOrgCode,ri!expediteline.ship_from,ri!expediteline.mfg_source_org_code),ri!expediteline.mfg_source_org_code_2))
),
a!save(local!itemMfgOrgCode,ri!expediteline.item_mfg_org_code)

},
refreshAfter: "UNFOCUS",
required: true,
readonly: false,
validations: {}
)

Here I am trying to save the text field value from UI into a local variable and pass as parameter to the query rule.

Thanks

  Discussion posts and replies are publicly visible