#----------------------------------------------------------------
my $list = $csapi->GetListBox($aUser, "request_type");
for(my $i=0; $i < $list->getListboxSize(); $i++) {
my $label = $list->getLabel($i);
my $value = $list->getValue($i);
print "Listbox label|value: [$i] - [$label]|[$value]\n";
}
#Output:
Listbox label|value: [0] - [Any]|[0]
Listbox label|value: [1] - [Defect]|[1]
Listbox label|value: [2] - [Enhancement]|[2]
#----------------------------------------------------------------
#----------------------------------------------------------------
my $list = $csapi->GetListBox($aUser, "severity");
for(my $i=0; $i < $list->getListboxSize(); $i++) {
my $label = $list->getLabel($i);
my $value = $list->getValue($i);
print "Listbox label|value: [$i] - [$label]|[$value]\n";
}
#Output:
Listbox label|value: [0] - [Any]|[0]
Listbox label|value: [1] - [Fatal]|[1]
Listbox label|value: [2] - [Severe]|[2]
Listbox label|value: [3] - [Medium]|[3]
Listbox label|value: [4] - [Warning]|[4]
Listbox label|value: [5] - [Maskable]|[5]
Listbox label|value: [6] - [High]|[6]
Listbox label|value: [7] - [None]|[7]
#----------------------------------------------------------------Giuseppe,
Have you thought about attacking the problem differently? (or maybe I’m not following your problem). Anyway, I set up my listboxes using dependencies. I then use a jython script where the script fills in the lower level values dependent on the what the upper level is set to. This prevents illegal entries from popping in.
Rich
Richard F. Sheehan
Systems Admin Sr Prin
Enterprise Shared Services
BAE Systems, Inc.
T: 607.770.2897
|
M: 607.953.9424
|
E:
richard....@baesystems.com
1098 Clark Street, Endicott, NY, 13760, USA – Bldg. 46-2 D47
www.baesystems.com
Connect with
BAE Systems:
![]()
![]()
![]()
![]()
From: synergy...@googlegroups.com
<synergy...@googlegroups.com> On Behalf Of gserri
Sent: Monday, January 07, 2019 9:04 AM
To: Synergy CM Tool <synergy...@googlegroups.com>
Subject: ibm change perl csapi: how to get value of depending attrs of a listbox
***
WARNING
***
EXTERNAL EMAIL -- This message originates from outside our organization.
--
You received this message because you are subscribed to the Google Groups "Synergy CM Tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
synergy-cm-to...@googlegroups.com.
To post to this group, send email to
synergy...@googlegroups.com.
Visit this group at https://groups.google.com/group/synergy-cm-tool.
For more options, visit https://groups.google.com/d/optout.
--