Dmitriy@Euroset
Member
I have agregate SQL, and i want to write my own refresh sql for this query. But it'sn't work 
//qItems.FieldByName('normal_qty').AsInteger = 153
OnApplyRecord:
if Action='R' then
begin
qItemsRefresh.SetVariable('unit_id',qItems.GetVariable('unit_id'));//qItems hasn't field unit_id
qItems.DeclareQueryVariables(qItemsRefresh);
qItems.SetQueryVariables(qItemsRefresh);
qItemsRefresh.Execute;
//qItems.FieldByName('normal_qty').AsInteger = 153
//qItemsRefresh.FieldAsItneger('normal_qty') = 152
qItems.GetQueryVariables(qItemsRefresh);
//qItems.FieldByName('normal_qty').AsInteger = 153
Applied:=True;
end;
What happens?
And sorry for my English.

//qItems.FieldByName('normal_qty').AsInteger = 153
OnApplyRecord:
if Action='R' then
begin
qItemsRefresh.SetVariable('unit_id',qItems.GetVariable('unit_id'));//qItems hasn't field unit_id
qItems.DeclareQueryVariables(qItemsRefresh);
qItems.SetQueryVariables(qItemsRefresh);
qItemsRefresh.Execute;
//qItems.FieldByName('normal_qty').AsInteger = 153
//qItemsRefresh.FieldAsItneger('normal_qty') = 152
qItems.GetQueryVariables(qItemsRefresh);
//qItems.FieldByName('normal_qty').AsInteger = 153
Applied:=True;
end;
What happens?
And sorry for my English.