Importazione multifile in uno script/flusso di lavoroQual è il modo migliore per utilizzare l'importazione di più file in uno script?
[Voglio dare all'utente la possibilità di modificare le impostazioni e poi cliccare su Importa .]
Il mio approccio attuale:
- Pause the script till the import is ready:
- utilizzare un ciclo while
- fermarlo tramiteImposta callback di importazione
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 ..
Per interrompere l'esecuzione del codice successivo, selezionare
if (items(dts) ==0, Throw("no data"));
did you know that fermare() inside a Workflow step just stops the execution of the current step?
so: Gettare().
-
L'utente può chiudere la finestra di dialogo MFI tramite

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>Automazione e scripting</LINGO-LABEL></LINGO-LABS>Re: Importazione multifile in uno script/flusso di lavoroDovresti riuscire a ottenere l'elenco delle tabelle importate dalla funzione di callback; guarda l'esempio SetImportCallback.
Se JSL esegue il <
Re: Importazione multifile in uno script/flusso di lavorociao @Craige_Hales
In alternativa, ho modificato il comportamento del pulsante Importa:
my win[ButtonBox(8)] << set function (dts = mfi << Import Data(); wait(0); finished=1);
Ma sfortunatamente viene attivata anche l'importazione originale.
... quindi ho sostituito il pulsante di importazione con uno alternativo:
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
A quale esempio ti riferisci? Non sono riuscito a trovarlo.
Re: Importazione multifile in uno script/flusso di lavoroAssicurati che il selettore di categoria mostri gli oggetti (o tutti).

Re: Importazione multifile in uno script/flusso di lavoro: )