脚本/工作流中的多文件导入在脚本中使用多文件导入的最佳方法是什么?
[我想让用户有机会编辑设置,然后单击“导入” 。]
我目前的做法:
- Pause the script till the import is ready:
- 使用 while 循环
- 通过以下方式停止设置导入回调
finished= 0;
mfi = Multiple File Import(
<<SET import="" callback=""></SET>
get a list of the imported data tables:<BR />via <FONT face="courier new,courier">_wfb_Listdiff()</FONT> (from Workflow Builder):<BR />
<CODE class=" language-jsl">_wfb_ListDiff = Function( {tempOld, tempNew},
For( i = 1, i <= N Items( tempOld ), i++,
For( k = N Items( tempNew ), k >= 1, k--,
If( tempOld[i] == tempNew[k],
Remove From( tempNew, k, 1 )
)
)
);
tempNew;
);
Custom_step_tables_old = Get Data Table List();
MFI();
while(no(finished), wait());
Custom_step_tables_new = Get Data Table List();
dts = _wfb_ListDiff( Custom_step_tables_old, Custom_step_tables_new );
- if there is no data ..
要停止后续代码的执行,请检查
if (items(dts) ==0, Throw("no data"));
did you know that 停止() inside a Workflow step just stops the execution of the current step?
so: 扔()。
-
用户可以通过以下方式关闭 MFI 对话框

then the while loop will run forever (or: till the user presses ESC)
-> add an on close script:
my win = mfi << createwindow;
wait(0);
current window() << on close(finished=1)
<LINGO-LABS id="lingo-labs-867950" slang="en-US" mode="UPDATE"><LINGO-LABEL>自动化和脚本</LINGO-LABEL></LINGO-LABS>回复:脚本/工作流程中的多文件导入您应该能够从回调函数中获取导入表的列表,请查看 SetImportCallback 示例。
如果 JSL 执行 <
回复:脚本/工作流程中的多文件导入你好@Craige_Hales
作为替代方案,我改变了导入按钮的行为:
my win[ButtonBox(8)] << set function (dts = mfi << Import Data(); wait(0); finished=1);
但不幸的是,原始导入也被触发了。
...所以我用另一个按钮替换了导入按钮:
my win = mfi << createwindow;
my win[ButtonBox(8)] << sib append (Button Box ("Import +",dts = mfi << Import Data(); wait(0); my win << close window()));<BR />my win[ButtonBox(8)] << delete
您指的是什么例子,我找不到它。
回复:脚本/工作流中的多文件导入确保类别选择器显示对象(或全部)。

回复:脚本/工作流程中的多文件导入:)