WINDEV

Startbeitrag von Vinit Sawant am 16.11.2017 13:15

Can anyone please explain what does below code do?

NumCmd =""
SI Gauche(WBS,3) ="FR-" ALORS
NumCmd = Milieu(WBS,4,7)
TableauCode = Milieu(WBS,12,4)
FIN
SI Gauche(WBS,6) ="XX-01-" OU Gauche(WBS,6) ="ZZ-01-" ALORS
NumCmd = Milieu(WBS,7,6)
TableauCode = Milieu(WBS,14,4)
FIN

I'm not able to understand it as I'm new to WINDEV.

Antworten:

Hi Vinit,

does this translation make it more clear?


NumCmd =""
IF Left(WBS,3) ="FR-" ALORS
NumCmd = Middle(WBS,4,7)
TableauCode = Middle(WBS,12,4)
END
IF Left(WBS,6) ="XX-01-" OU Left(WBS,6) ="ZZ-01-" THEN
NumCmd = Middle(WBS,7,6)
TableauCode = Middle(WBS,14,4)
END


von Stefan Bentvelsen - am 16.11.2017 13:31
Hi Stefan,
Thanks for your reply.

I want to know what this code is doing and it's purpose.
Because I want to add "FF-*********" (* will be any digits)in this but I'm not able to understand this code. If you can explain this code then it will be very useful.

von Vinit Sawant - am 16.11.2017 13:45
Hi Vinit,

NumCmd =""
IF Left(WBS,3) ="FR-" ALORS // If leftmost 3 characters of WBS equal to "FR-"
NumCmd = Middle(WBS,4,7) // NumCmd becomes WBS from position 4 the next 7 characters
TableauCode = Middle(WBS,12,4) // TableauCode becoms WBS from position 12 the nest 4 characters
END
IF Left(WBS,6) ="XX-01-" OU Left(WBS,6) ="ZZ-01-" THEN // If leftmost 6 characters of WBS equal to "XX-01-" or "ZZ-01-"
NumCmd = Middle(WBS,7,6) // NumCmd becomes WBS from position 7 the next 6 characters
TableauCode = Middle(WBS,14,4) // TableauCode becomes WBS from position 14 the nest 4 characters
END

I hope, this helps for you.

von Stefan Bentvelsen - am 16.11.2017 14:50
Yes it does help a lot.
Thanks:)

von Vinit Sawant - am 17.11.2017 06:13
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.