![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Selection in Multilist Topic Summary: Created On: 9-Feb-2007 16:28 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Before going through your loop to process the selections you could first check which items are selected. Also. In your example you say your loop is "for selecteditem in (Array of attributes) do {". Is this what your loop is? Because it should be "for selecteditem in yourDBEMultiList do {". If you're going through your array instead of the multiList thats the problem. I guess another round-a-bout way of checking if you have a selection is to do the "get yourDBEMultiList" into a string and make sure its length is greater than 0. If not, output a message and halt. | |
![]() |
|
I am working on a code that selects more than one item (attributes of a module) from a multilist and applies the same access rights to these attributes. I have the following loop which works well when the items are selected in the multilist.
for selecteditem in (Array of attributes) do { if (ad.name == selecteditem) (do something) } If no item is selected, I want the code to show that no item is selected and halt the program. I tried using if(selected item == "") and if (null selecteditem), but there is no effect. The program runs and does nothing of course. How can the code sense that no selection is made in the multilist (or list) without resorting to the listView DBE? Is there any callback function that I can run with the code? - Krishna |
|
![]() |
|
![]() |
|
Before going through your loop to process the selections you could first check which items are selected. Also. In your example you say your loop is "for selecteditem in (Array of attributes) do {". Is this what your loop is? Because it should be "for selecteditem in yourDBEMultiList do {". If you're going through your array instead of the multiList thats the problem. I guess another round-a-bout way of checking if you have a selection is to do the "get yourDBEMultiList" into a string and make sure its length is greater than 0. If not, output a message and halt. ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com Edited: 9-Feb-2007 at 19:53 by David Pechacek |
|
![]() |
|
![]() |
|
Thanks for the reply. In fact I was working with "selecteditem in (multilistDBE)" and not "in array". Otherwise I would have got an error.
The workaround worked well. I missed the function "selected(DBE element, index i)". Thanks again for a quick reply. - Krishna |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Selection in Multilist
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.