Seite 1 von 1

[GELÖST] getProductMap no valid expression for a string list

Verfasst: 14 Sep 2014, 14:28
von GEI
hi,

ich habe ein Problem mit der erstmaligen Verwendung der Funktion "getProductMap".

Dieses Codeschnipsel

Code: Alles auswählen

...
   setLogLevel = 9
   Set $ProductMap$ = getProductMap
   Set $ProductName$ = getValue("name",$ProductMap$)
   Set $ProductVersion$ = getValue("productversion",$ProductMap$)
   Set $ProductInstalledVersion$ = getValue("installedversion",$ProductMap$)
   setLogLevel = 8

   comment "Show product picture"
   ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductName$
...
erzeugt nachfolgende Fehlermeldung im Log:

Code: Alles auswählen

[1] [Sep 13 08:24:45:974] opsi-winst 4.11.3.11 started at >>13.09.2014 08:24:44
...
[1] [Sep 13 08:24:47:740] [mremoteng]   LogLevel was 6
[1] [Sep 13 08:24:47:740] [mremoteng]   LogLevel set to 9
[5] [Sep 13 08:24:47:740] [mremoteng]   
[5] [Sep 13 08:24:47:740] [mremoteng]   Set  $ProductMap$ = getProductMap
[2] [Sep 13 08:24:47:740] [mremoteng]   Syntax Error in Section: Actions (Command in line 70): $ProductMap$ = getProductMap -> getProductMap illegal String expression
[5] [Sep 13 08:24:47:740] [mremoteng]   
[5] [Sep 13 08:24:47:740] [mremoteng]   Set  $ProductName$ = getValue("name",$ProductMap$)
[2] [Sep 13 08:24:47:740] [mremoteng]   Syntax Error in Section: Actions (Command in line 71): $ProductName$ = getValue("name",$ProductMap$) -> $ProductMap$) no valid expression for a string list
[5] [Sep 13 08:24:47:740] [mremoteng]   
[5] [Sep 13 08:24:47:740] [mremoteng]   Set  $ProductVersion$ = getValue("productversion",$ProductMap$)
[2] [Sep 13 08:24:47:740] [mremoteng]   Syntax Error in Section: Actions (Command in line 72): $ProductVersion$ = getValue("productversion",$ProductMap$) -> $ProductMap$) no valid expression for a string list
[5] [Sep 13 08:24:47:740] [mremoteng]   
[5] [Sep 13 08:24:47:740] [mremoteng]   Set  $ProductInstalledVersion$ = getValue("installedversion",$ProductMap$)
[2] [Sep 13 08:24:47:740] [mremoteng]   Syntax Error in Section: Actions (Command in line 73): $ProductInstalledVersion$ = getValue("installedversion",$ProductMap$) -> $ProductMap$) no valid expression for a string list
[1] [Sep 13 08:24:47:740] [mremoteng]   LogLevel was 9
[1] [Sep 13 08:24:47:740] [mremoteng]   LogLevel set to 8
[5] [Sep 13 08:24:47:740] [mremoteng]   comment: Show product picture
Hmm, was mache ich denn hierbei falsch? Es sieht ja so aus, als ob die Funktion "getProductMap" hier nicht verwendet werden kann.
Muss diese denn in eine OPSI-Call-Sektion ausgelagert werden?

Re: getProductMap

Verfasst: 14 Sep 2014, 15:34
von d.oertel
Hi,

getProductMap ist eine Stringlisten Funktion.
Hast Du $ProductMap$ als Stringliste Definiert ?

Code: Alles auswählen

DefStringlist $ProductMap$ 
gruss
d.oertel

Re: getProductMap

Verfasst: 14 Sep 2014, 17:39
von GEI
DANKE, das war es .... Ich scheine "Tomaten auf den Augen" gehabt zu haben :lol: