Question
BITSINGLASS
IN
Last activity: 1 Dec 2015 21:23 EST
Appending a Page to page list after a specific row
Hi,
Inside a grid I am trying to a add an item(immediate next to the current row) on-change of a dropdown value(if the selected value equal to some 'X') .
please find the below configuration. Problem here is if i do post value or refresh section additem action is not getting triggered.
can anyone help on this issue.Thanks in advance.
Regards,
Subbarao Muthineni.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Best Buy Co Inc.
US
can you try to add to the list with (<insert>Param.int) where param.int is basically pxListSubscript +1 that way it would add it after the current line. after you add to the list with a datatransform you can then refresh the section.
Best,
Jay Hysenbegasi
BITSINGLASS
IN
Pegasystems Inc.
IN
OOTB rule reference: RULE-OBJ-MODEL RULE-OBJ-CASETYPE PYAPPENDORINSERTSTAGE
BITSINGLASS
IN
There is no such rule.i am using PEGA 7.1.6 version.
Pegasystems Inc.
IN
sorry its been added in Pega-ProcessArchitect:07-10-17.
however, it has the same logic shared by Jay Hysenbegasi.
side note: instead of Refresh event ... could you please try Refresh list action....
Thank you!
BITSINGLASS
IN
Hi Jay Hysenbegasi,
What you told i implemented actually it should work but there is some issue when refreshing the list.
It is not giving the expected result.
Thanks,
Subbarao M.
Luxoft
UA
Hi,
Also you can add Activity, which will <APPEND> list with appropiate condition, on Behavior Onchange ( Refresh section)
Thanks,
Luxoft
UA
Hi,
For Example, we have 3 rows, 1 column. User select row #2, add some data (X). Add behavior Onchange (Refresh section and add activity).
Activity:
Precondition:
- Each PageList has property Number, for example:
*****.pxResults(1).Number = 2;
*****.pxResults(2).Number = 4;
*****.pxResults(3).Number = 6;
Difference between each Number = 2;
1) local.indx =param.pyForEachCount; local.Number = pxResults(<CURRENT>).Number (row # 2)
2) pxResults(<Append>) into PageList(added last(4 empty) row ).
3) property-set. pxResults(<LAST>).number = local.Number+1.
Now we have the next:
*****.pxResults(1).Number = 2;
*****.pxResults(2).Number = 4;
*****.pxResults(3).Number = 6;
*****.pxResults(4).Number = 5; (New row)
4) Obj-Sort, after which we have the next:
*****.pxResults(1).Number = 2;
*****.pxResults(2).Number = 4;
*****.pxResults(4).Number = 5; (New row)
Hi,
For Example, we have 3 rows, 1 column. User select row #2, add some data (X). Add behavior Onchange (Refresh section and add activity).
Activity:
Precondition:
- Each PageList has property Number, for example:
*****.pxResults(1).Number = 2;
*****.pxResults(2).Number = 4;
*****.pxResults(3).Number = 6;
Difference between each Number = 2;
1) local.indx =param.pyForEachCount; local.Number = pxResults(<CURRENT>).Number (row # 2)
2) pxResults(<Append>) into PageList(added last(4 empty) row ).
3) property-set. pxResults(<LAST>).number = local.Number+1.
Now we have the next:
*****.pxResults(1).Number = 2;
*****.pxResults(2).Number = 4;
*****.pxResults(3).Number = 6;
*****.pxResults(4).Number = 5; (New row)
4) Obj-Sort, after which we have the next:
*****.pxResults(1).Number = 2;
*****.pxResults(2).Number = 4;
*****.pxResults(4).Number = 5; (New row)
*****.pxResults(3).Number = 6;
5) Recalculate Number property:
*****.pxResults(1).Number = 2;
*****.pxResults(2).Number = 4;
*****.pxResults(4).Number = 6; (New row)
*****.pxResults(3).Number = 8;
Best Buy Co Inc.
US
to enter a new row in a specific position you need to use (<insert>x) see my comment above also.
append will just add at the bottom of the list.
Best,
Jay Hysenbegasi
BITSINGLASS
IN
My requirement is to add after a specific position.
Thank you so much Jay Hysenbegasi for your response. I will try whatever you suggested.
Updated: 30 Nov 2015 8:39 EST
Luxoft
UA
Jay Hysenbegasi, what about steps 1-5 which mentioned above by me?
Best Buy Co Inc.
US
Hi Artem,
I think your solution is relying on the sort to get the items lined up correctly and it might not be the case that they will from simply sorting them. I guess it could work depending on the scenario but should not count that after you issue a sort on the list they will be in the order that you want/expect.
Best,
Jay Hysenbegasi
JPMC
IN
How about first add item and then do your post value.
Updated: 28 Nov 2015 11:40 EST
Pegasystems Inc.
IN
FYI: coping copying from school/learning's book. Thank you!
- Append : To add an element to the end (highest index value) a Value List or Page List property
- Last : To set or retrieve an element value from the end (highest index value) a Value List or Page List property, use the <LAST> index keyword
- Insert : Use the <INSERT> keyword followed by an integer to insert a new element and its value into a Value List or Page List
- Prepend: Use the <PREPEND> keyword insert a new element and its value into a Value List or Page List property as the first element.
- Current: Within a single activity step, you can set up an iteration that performs a repeated computation over a collection, such as all the elements in a Value List property. In that context, the <CURRENT> index identifies the index value for the current iteration.
UnitedHealth Group
IN
Hi Subbarao,
Based on the above screenshot. You have not passed the AdjIndex to the activity. Check for AdjIndex parameter value in run time.
Since value is NULL, I guess it is appending to the end.
Regards,
Prasad
BITSINGLASS
IN
Hi Prasad,
I am passing the parameter but kept the wrong screen shot.
it is something wrong when i am doing refresh list.
Thanks,
SUBBARAO M
UnitedHealth Group
IN
Hi Subbarao,
Try refreshing the section where the repeating grid is placed. That may help.
Regards,
Prasad
BITSINGLASS
IN
Hi Prasad,
I cannot do it because it will not fit in my scenario. If user is doing this in 3rd or 4th page then if we refresh the section we will be coming back to first page.
Thanks,
Subbarao M.