Modify the value of the InMemory type data table in the form

Hi,
After I query the data in the form, I need to click a button to modify the data, but I found that the data is stored in a temporary table of InMemory type. How should I write the code to modify the data?

[FormControlEventHandler(formControlStr(InventAdjTransaction, SalesReturnCostAutoFill), FormControlEventType::Clicked)]
    public static void SalesReturnCostAutoFill_OnClicked(FormControl sender, FormControlEventArgs e)
    {
        FormRun formRun = sender.formRun();
        FormDataSource                      tmpFormLookUp_ds;
        TmpFormLookUp                       tmpFormLookUp;
        InventTrans                         inventTrans,inventTransTmp;
        InventTransOrigin                   inventTransOrigin,inventTransOriginTFLU;
        tmpFormLookUp_ds = formRun.dataSource("TmpFormLookUp");
        tmpFormLookUp = tmpFormLookUp_ds.cursor();
        update_recordset tmpFormLookUp
        setting
            adjustNow = - inventTrans.CostAmountOperations
        join inventTransTmp
            where inventTransTmp.RecId == tmpFormLookUp.transRecId
        join inventTrans
            where inventTrans.InventTransOrigin == inventTransTmp.MarkingRefInventTransOrigin
            && inventTrans.ItemId == tmpFormLookUp.itemId
            &&  inventTrans.DateFinancial >= DateStartMth(tmpFormLookUp.dateFinancial)
            && inventTrans.DateFinancial <= DateEndMth(tmpFormLookUp.dateFinancial)
            && inventTrans.Qty == - tmpFormLookUp.qty
            && inventTrans.CostAmountOperations != 0
        join inventTransOrigin
            where inventTrans.InventTransOrigin == inventTransOrigin.RecId
            && inventTransOrigin.ReferenceCategory == InventTransType::Purch;  
        
        formRun.doResearch();
    }