cancel
Showing results for 
Search instead for 
Did you mean: 

Write value to a column in collection dynamically

Former Member
0 Kudos

Hi Experts ,

I'm adding 'N' Rows for a collection . First 2 rows i'm using get/set methods to update the columns . Starting from 3rd row I need to fill columns dynamically .. i will start writing from 1st column of 3rd row and need to stop at 3rd column of Nth row . Pls help me / guide me on this . when i'm using iterator , it's updating values for all the columns starting from 3rd row ..

Thanks in Advance,

Tayi

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Tayi -

Can you provide the details of your collection? I am assuming it is an extension collection, right? Could you include the collection name as well as the attribute names? I can help describe the necessary scripting if I have those details.

Thanks,

Rob

Former Member
0 Kudos

Hi Rob ,

Thanks for your reply .

I have an extension collection by name 'X' . IT has 5 columns " Year , C1 ,C2,C3 ,C4 " .

I have created first 2 rows and filled out all columns .

starting from 3rd row , based a condition rows will get included for collection 'X' . I have to start filling from 3rd .

i.e. i have passed 2000 to one field and no. of rows added are 4 . then for each row 2000/4 i.e 500 .Now 500 will be divided b/w 4 columns of each row .. for Last row 1st column alone it has to pass value(500/4) .remaining rows need to be empty .

Also I need to have choice of changing the auto-populated values . For all rows it's working fine .except for last row 1st column . After I enter value to 1st column last row and hit save , iT's getting updated back to auto-value(i.e. 500/4)

Also i need to start iteration from 3rd column of 2nd row till end , for certain validations .

Can you pls guide me .

Thanks

Tayi

Edited by: TDeepika on Sep 14, 2010 10:47 AM

Former Member
0 Kudos

Hi Tayi -

This sounds like something very specific to the logic in your code. Without seeing the code, I will have to speculate on what the issue could be...the only thing that immediately comes to my mind is that the code is "creating" the last row, but not "adding" it back to the collection. Typically, collection rows that are being added as you describe are first created using the create API, then the values are set in the collection member that is created, and lastly that collection member is added using the add API.

I hope this helps.

Rob

Former Member
0 Kudos

Hi Rob ,

Thanks for your reply . I have resolved this issue

Regards,

Tayi