![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Get the selected Skiplist Values and storing into an Array Topic Summary: Created On: 20-Oct-2008 21:58 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
How to get the selected skiplist values and store that into an array to create Enum Attributes type values?
Eg: // I have a skiplist which will display all the users who got access to the module. Now I can select the multiple users and print. print("Selected: " (string key skipUsers) "\n") // Now I want to get the Selected users and assign that as a value to create multi value Enumerated attribute. string optVal[ ] = selectedUsers Here my problem is If i select 5 users from the skiplist, It's taking only the users which i select last, the remaining 4 values are not included. Please help. Thanks in Advance... |
|
![]() |
|
![]() |
|
See attached.
It gets sticky if you figure to use the Array to initialize the Dialog choice() DBE, as the array must either be defined globally or be in the same function as the realize() command. An alternative would simply to declare a really big array globally, then keep track (Count) of how many entries you put in it. - Louie |
|
![]() |
|
![]() |
|
Thanks a lot for your Quick reply.
Actually the skiplist is like this" DOORS ID Full Name Email id 39384948 Murugaraj, S Murugaraj.s@ge.com 87808090 Louie Landale Louie.Landale@...com I am reading only the DOORS ID, the print("Selected: " (string key skipUsers) "\n") printing only the DOORS ID & I think it should work, I am testing it right now & will update soon. Once again Thanks!! Regards, Murugaraj S |
|
![]() |
|
![]() |
|
Thanks. I used your code & tested..
But I am getting arrany bounds error, Then I checked the (string key skipUsers) & print: Its printing like this: 30700474530700456730700474630700589 It suppose to be like this 307004745 307004567 307004746 .... .... .... I never used skiplist before, firsttime i m using, so i dont know how to get the value one by one. Can you suggest me? Thanks! |
|
![]() |
|
![]() |
|
There may be a problem in the print command. Perhaps stage the Key before printing it:
string Key = (string key skp) print Key "\n" - Louie |
|
![]() |
|
![]() |
|
I'm trying to create a dialog box to update requirements.
Example: I want the user to be able to select the attributes that are going to be update and then with this attributes selected create a dialog box or a form to start the update. First I need to insert an array for the attribute selection, then I going to program each user requirement selected to populate the DBox Example: if(selItem = "requirement"){ buf = DBE elem text if(selItem = "cost"){ buf = DBE elem text ... I have not tried this yet, because first i need to populate the array, but apparently something is wrong in the code. Code Attached Edited: 22-Oct-2008 at 18:28 by Douglas Perez |
|
![]() |
|
![]() |
|
You are declaring selAttr[] at size zero, but then trying to insert entries further down. Looks like you want to count the number of entries in the Skip (which you do), THEN declar selAttr[count]; THEN populate it. Another alternative would be to declare the array very large.
- Louie |
|
![]() |
|
![]() |
|
Hi Louie,
Thanks a lot for you.. I tried with your tip. But it didnt work for me. I want to create a enumerated attribute with the selected value ( user.name) by the Admin. I used skip list to store the value, which was selected by the Admin. But I am unable to store the value into Array to create enumberated attribute. Please help me with this. Thanks in Advance. |
|
![]() |
|
![]() |
|
Replace
put (skipUser, user.name, user) with put (skipUser, uName, user) ------------------------- Kevin Murphy http://www.baselinesinc.com |
|
![]() |
|
![]() |
|
Thanks Kevin..You are the Great!
As per your advice, I am trying to create a Module level attributes with the enum value as SSO of the user. So, when the trigger is applied I am reading this module level attribute value to send email. But my issue is I am storing the user & groups who got access to the module in a skip list. I need that value in array, so that i can create a enumerated attributes by assigining the value as user & groups. string optVal [] = (string key (skipUsers)) I just tride the above written code, But i got Array bounds error. Please help me. Thanks! Error:--------------------------------- -R-E- DXL: <Line:34> array bounds exceeded (-1) -I- DXL: execution halted |
|
![]() |
|
![]() |
|
S,
Reread Louie's advice: Good luck. ------------------------- Kevin Murphy http://www.baselinesinc.com |
|
![]() |
|
![]() |
|
Dear Kevin & Louie,
Yes, It was my mistake. I can store that value into Array and created enum attribute successfully. Thanks a lot for your help! |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.