GetProductPropertyList ohne Auswahl...
Verfasst: 07 Sep 2020, 16:47
Hallo,
habe ein sehr seltsames Problem. Ich will eine ProductProperty-Liste, die als default keine Vorauswahl hat...
Ergibt...
Bis hierher alles, wie ich es erwarten würde.
Verwende diesen Konstrukt 'if (count($List$) = "0")' in einem Skript mehrfach. Er funktioniert genau _einmal_ nicht...
opsi-winst-Version ist 4.12.4.0 (testing).
Hat jemand eine Ahnung/Idee warum diese eine fehlschlagen könnte? Ich habe den Code mehrmals durchgelesen, ich sehe keine Unterschiede zu den funktionierenden.
Oder wie macht ihr das mit GetProductPropertyList, wenn es keine Vorauswahl als Default geben soll?
Danke und Gruß
Thomas
habe ein sehr seltsames Problem. Ich will eine ProductProperty-Liste, die als default keine Vorauswahl hat...
Code: Alles auswählen
description:
advice:
version: 1.0
priority: 0
licenseRequired: False
productClasses:
setupScript: setup.opsiscript
uninstallScript:
updateScript:
alwaysScript:
onceScript:
customScript:
userLoginScript:
[ProductProperty]
type: unicode
name: test
multivalue: True
editable: True
values: ["test1", "test2"]
default: []
Code: Alles auswählen
[Actions]
DefStringlist $List$
Set $List$ = GetProductPropertyList("test","")
if (count($List$) = "0")
comment "No choice made. Nothing to do"
else
comment "A choice was made"
endif
Code: Alles auswählen
(93) [6] [2020-09-07 16:37:14.289] [test_pp-list-null] Set $List$ = GetProductPropertyList("test","")
(98) [7] [2020-09-07 16:37:14.717] [test_pp-list-null] The value of the variable "$List$" is now:
(99) [6] [2020-09-07 16:37:14.734] [test_pp-list-null] If
(100) [7] [2020-09-07 16:37:14.745] [test_pp-list-null] count($List$) = "0" <<< result true
(101) [6] [2020-09-07 16:37:14.745] [test_pp-list-null] (count($List$) = "0") <<< result true
(102) [6] [2020-09-07 16:37:14.745] [test_pp-list-null] Then
(103) [5] [2020-09-07 16:37:14.745] [test_pp-list-null] comment: No choice made. Nothing to do
(104) [6] [2020-09-07 16:37:14.745] [test_pp-list-null] Else
(105) [6] [2020-09-07 16:37:14.745] [test_pp-list-null] EndIf
Verwende diesen Konstrukt 'if (count($List$) = "0")' in einem Skript mehrfach. Er funktioniert genau _einmal_ nicht...
Code: Alles auswählen
[6] [2020-09-07 16:28:15.657] [o4i_firefox-esr] Set $ListPolFromProperty$ = GetProductPropertyList("policy_popup_blocking","")
[7] [2020-09-07 16:28:16.025] [o4i_firefox-esr] The value of the variable "$ListPolFromProperty$" is now:
[7] [2020-09-07 16:28:16.025] [o4i_firefox-esr] (string 0)
[6] [2020-09-07 16:28:16.034] [o4i_firefox-esr] If
[7] [2020-09-07 16:28:16.036] [o4i_firefox-esr] count($ListPolFromProperty$) = "0" <<< result false
[6] [2020-09-07 16:28:16.036] [o4i_firefox-esr] (count($ListPolFromProperty$) = "0") <<< result false
[6] [2020-09-07 16:28:16.036] [o4i_firefox-esr] Then
Hat jemand eine Ahnung/Idee warum diese eine fehlschlagen könnte? Ich habe den Code mehrmals durchgelesen, ich sehe keine Unterschiede zu den funktionierenden.
Oder wie macht ihr das mit GetProductPropertyList, wenn es keine Vorauswahl als Default geben soll?
Danke und Gruß
Thomas