![]() |
Telelogic SYNERGY (steve huntington) | ![]() |
Topic Title: How do I Get the Current Listbox Value with Perl API? Topic Summary: getDataObjectByName doesn't work for a listbox attribute? Created On: 29-Aug-2008 15:21 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Nevermind, I figured it out. And in case any new Perl API people run into this problem you can use: my $information = $csapi->GetCRData($user, $trigger->get_object_id(), "child_spiral_name"); my $child_spiral= $information->getDataObjectByName("child_spiral_name")->getValue(); print($log "****child_spiral = " . $child_spiral . "\n"); where child_spiral name is the listbox name. Thanks. | |
![]() |
|
I have this code:
my $report = "ND - SCR and All Children Report"; my $queryString = "problem_number='".$trigger->get_object_id() . "'"; my $data = $csapi->QueryData($user, $report, $queryString, undef, undef, undef); print($log "Info:\n"); if($data->getDataSize() > 0) { #Data is from apiQueryData, getDataObject returns an apiObjectVector for(my $i=0; $i<$data->getDataSize(); $i++) { my $objVec = $data->getDataObject($i); print($log "problem_number = ".$objVec->getDataObjectByName("problem_number")->getValue()."\n"); print($log "problem_synopsis = ".$objVec->getDataObjectByName("problem_synopsis")->getValue()."\n"); print($log "crstatus = ".$objVec->getDataObjectByName("crstatus")->getValue()."\n"); } } And I will be able to see those attributes just fine, but if I try using getDataObjectByName with a listbox attribute, I cannot get that current value. I understand you can use csapi to get all the listbox values, but I want the current listbox value. Thanks. |
|
![]() |
|
![]() |
|
Nevermind, I figured it out. And in case any new Perl API people run into this problem you can use:
my $information = $csapi->GetCRData($user, $trigger->get_object_id(), "child_spiral_name"); my $child_spiral= $information->getDataObjectByName("child_spiral_name")->getValue(); print($log "****child_spiral = " . $child_spiral . "\n"); where child_spiral name is the listbox name. Thanks. |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.