Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WX-Products: Suggestions & Feature Requests
Beiträge im Thema:
5
Erster Beitrag:
vor 6 Monaten
Letzter Beitrag:
vor 3 Monaten
Beteiligte Autoren:
Ola, Al

Please, give me "For All sFileName"

Startbeitrag von Ola am 16.04.2017 09:59

Hi all,

It is possible to pass the filename as a variable to many WX file handling commands, but not to "For All". Having this possibility would make it possible to make very generic procedures.

I wonder why this is not possible? Maybe it is too difficult for PCsoft to do?

Best regards
Ola

Antworten:

Hello Ola

Can you give a specific example of what you are trying to achieve please.

The standard method is to extract a directory list into a string and then work through the string using fExtractPath() to breakout the file name and other pieces.

LFileName is string
LFileList = fListFile(LSrchDir,frRecursive)
// For each file found
FOR EACH STRING LFileName OF LFileList SEPARATED BY CR


Regards
Al

von Al - am 16.04.2017 12:29
Hi Al,

Sorry, I didn't notice your msg earlier.

I'm trying to achieve something like this:


sFile is string = "SOItem" //= Sales order items file
//could also be WOItem = Work order items file etc...

FOR ALL sFile
{sFile + "." + "PRICE",inditem} += 100.00
HModify(sFile)


Best regards
Ola

von Ola - am 18.07.2017 19:54
Hello Ola

I think this syntax will work
{sFile ,indfile} + ".PRICE" += 100.00

Regards
Al

von Al - am 18.07.2017 20:25
Hi Al,

{sFile + "." + "PRICE",inditem} += 100.00 works all right, but

FOR ALL sFile does not, and that is my point here. Neither does

FOR ALL {sFile,indfile}, which also fails.

A variable simply cannot be used as the filename in FOR ALL filename.
Or, if it can, I don't know how.

Best regards
Ola

von Ola - am 19.07.2017 16:56
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.