Browse Source

feat: support expression in variable name in the Insert Data block (#1598)

Ahmad Kholid 1 năm trước cách đây
mục cha
commit
89964088e6
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      src/workflowEngine/blocksHandler/handlerInsertData.js

+ 6 - 1
src/workflowEngine/blocksHandler/handlerInsertData.js

@@ -81,7 +81,12 @@ async function insertData({ id, data }, { refData }) {
         this.addDataToColumn(item.name, tableValue);
       });
     } else {
-      await this.setVariable(item.name, value);
+      const variableName = await renderString(
+        item.name,
+        refData,
+        this.engine.isPopup
+      );
+      await this.setVariable(variableName.value, value);
     }
   }