<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hallo,
Mit folgendem Skript möchte ich einen "Pathfinder" mit Variablen erstellen (ausgewählte Elemente aus der Listbox).
Was mache ich falsch?
spath = "R: \ 00 DnA \ 2015 \";
// oder npath = "nasdlkxxx \ AB1_FileShare06 \ wpa001 \ 00 DnA \ 2015 \"
Tpm = {
Famar,
Gnosis,
Hospira,
LabBio
};
FamarSUB = {
Brufen P278,
Brufen P280,
Brufen N950,
Clari 3368,
Clari 10061,
Clari G656,
Clari L214,
Clari L950,
SAMe N309 G,
SAMe N309 TB,
SAMe N917 G
};
GnosisSUB = {
SAMe 16373 S4,
SAMe 24358 S7,
SAMe 53570 S21
};
HospiraSUB = {
SAMe N309,
SAMe N917,
SAMe P332
};
LabBioSUB = {
SAMe N309 G,
SAMe N309 TB,
SAMe N917 G
};
tpar = Assoziatives Array (Tpm, {FamarSUB, GnosisSUB, HospiraSUB, LabBioSUB});
Neues Fenster ("TPM UND Produkt auswählen", << Modal,
V-Listenfeld (
Textfeld ("Select TPM"),
tpmbox = Listenfeld (Tpm,
prodbox << alle entfernen;
prodbox << anhängen (
Eval (tpar [Parse ((tpmbox << wird ausgewählt) [1])]));
ctpm = tpmbox << ausgewählt werden;
)
Textfeld ("Produkt auswählen"),
Prodbox = List Box ({}),
Button Box ("OK", cpro = Prodbox << ausgewählt werden),
)
);
Datenpfad = Spath || ctpm || "\" || cpro || "\ Database";
data_file = Datei auswählen ("Datenbank auswählen");
dt_data = Open (Datenpfad || Datendatei, unsichtbar);
spec_path = spath || ctpm || "\" || cpro || "\ Misc \ Specs";
spec_file = Datei auswählen ("Spezifikationsdatei auswählen");
dt_spec = Open (spec_path || spec_file, unsichtbar);
Danke im Voraus,
Uwe
Die ausgewählten Elemente aus einem Listenfeld bilden eine Liste - auch wenn es nur eine Auswahl gibt. In Ihrem Code sind "ctpm" und "cpro" Listen. Die String-Verkettung schlägt daher fehl, wenn Sie die Variable data_path erstellen. Sie brauchen etwas wie:
selectedTpm = ctpm [ 1 ] ;
selectedPro = cpro [ 1 ] ;
Datenweg = Spath || selectedTpm || "\" || selectedPro || "\Datenbank" ;
und
spec_path = Spath || selectedTpm || "\" || selectedPro || "\ Misc \ Specs" ;