Importation multifichier dans un script/workflowQuelle est la meilleure façon d’utiliser l’importation multi-fichiers dans un script ?
[Je souhaite donner à l'utilisateur la possibilité de modifier les paramètres, puis de cliquer sur Importer .]
Mon approche actuelle :
- Pause the script till the import is ready:
- utiliser une boucle while
- arrêtez-le viaDéfinir le rappel d'importation
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 ..
Pour arrêter l'exécution du code suivant, cochez
if (items(dts) ==0, Throw("no data"));
did you know that arrêt() inside a Workflow step just stops the execution of the current step?
so: Lancer().
-
L'utilisateur peut fermer la boîte de dialogue MFI via

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>Automatisation et scripts</LINGO-LABEL></LINGO-LABS>Re : Importation multifichier dans un script/workflowVous devriez pouvoir obtenir la liste des tables importées à partir de la fonction de rappel, regardez l'exemple SetImportCallback.
Si JSL fait le <
Re : Importation multifichier dans un script/workflowSalut @Craige_Hales
En guise d’alternative, j’ai modifié le comportement du bouton Importer :
my win[ButtonBox(8)] << set function (dts = mfi << Import Data(); wait(0); finished=1);
Mais, malheureusement, l’importation d’origine est également déclenchée.
... j'ai donc remplacé le bouton d'importation par un autre :
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
À quel exemple faites-vous référence, je n'ai pas pu le trouver.
Re : Importation multifichier dans un script/workflowAssurez-vous que le sélecteur de catégorie affiche les objets (ou tous).

Re : Importation multifichier dans un script/workflow: )