Question
nylife
US
Last activity: 25 Jan 2017 9:16 EST
Repeat Grid has a column that is also a pagelist
Hello,
I have a Repeat Grid with 3 columns (A,B,C) that uses a pagelist (somepagelist) as a source. But this page list contains a ".bar" pagelist that is used for one of the column's sources (B):
repeat grid-source= somepagelist
A=.foo B=.bar(1).person C=.fizz
I need to get the iterator of the somepagelist source that is looping through the records and put in the .bar() index like this somehow:
A=.foo B=.bar(_the_current_index_of_somepagelist_).person C=.fizz
Is this possible?
Thank you!
Caesar
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
Hi Caesar,
Your scenario is not possible practically because the data Prop2={person="mahesh", person="sandeep", person="vijay"} of PageList2 is part of the PageList1. If you represent this data in the database format, PageList1 will be represented in table1 and PageList2 will be table2 data which is linked with table1.
So each row in table1 will have the data of {Prop1, Prop2, Prop3} where Prop2 PageList data will be available in table2, so to display the data of Prop2 from table2 you need to use the subreport as per my knowledge.
Logic:
- In your for loop iteration when count=1 -> You get the first record from database i.e. Prop1="abc", Prop2={person="mahesh", person="sandeep", person="vijay"}, Prop3="xyz"
- When count=2 -> you get the second record from database i.e. Prop1="123", Prop2={person="a1", person="a2"}, Prop3="456"
- So you cant display the Prop2="mahesh" in first record and Prop2="sandeep" for the second record because Prop2="sandeep" is related to the first record data of PageList1.
Real time example: Employee PageList1 is linked with Address PageList2 in it, now you cant display the Address of Employee2 into the Address of Employee1.
row Prop1 Prop2 Prop3
Hi Caesar,
Your scenario is not possible practically because the data Prop2={person="mahesh", person="sandeep", person="vijay"} of PageList2 is part of the PageList1. If you represent this data in the database format, PageList1 will be represented in table1 and PageList2 will be table2 data which is linked with table1.
So each row in table1 will have the data of {Prop1, Prop2, Prop3} where Prop2 PageList data will be available in table2, so to display the data of Prop2 from table2 you need to use the subreport as per my knowledge.
Logic:
- In your for loop iteration when count=1 -> You get the first record from database i.e. Prop1="abc", Prop2={person="mahesh", person="sandeep", person="vijay"}, Prop3="xyz"
- When count=2 -> you get the second record from database i.e. Prop1="123", Prop2={person="a1", person="a2"}, Prop3="456"
- So you cant display the Prop2="mahesh" in first record and Prop2="sandeep" for the second record because Prop2="sandeep" is related to the first record data of PageList1.
Real time example: Employee PageList1 is linked with Address PageList2 in it, now you cant display the Address of Employee2 into the Address of Employee1.
row Prop1 Prop2 Prop3
1 abc mahesh xyz
2 123 sandeep 456
Note: This requirement is not true as per me because you are trying to display the second record of PageList2 in the second record of PageList1, which is irrelavent as second record of PageList2(sandeep) is part of the first record in PageList1(abc).
Let me know if you still need further clarification.
Regards
Mahesh
Incessant Technologies
GB
Can you try including a section in column B and in that section put a grid with pagelist source as (.bar) .
Pegasystems Inc.
US
Hi Caesar,
You requirement is not clear. let say for an example, I have a PageList1(Prop1,Prop2, Prop3) in that Prop2 is another PageList which contains (person field).
Now my PageList1 data will be like this:
- Prop1="abc", Prop2={person="mahesh", person="sandeep", person="vijay"}, Prop3="xyz"
- Prop1="123", Prop2={person="a1", person="a2"}, Prop3="456"
Let us elaborate your requirement in detail with the sample data as explained above for our more understanding.
Regards
Mahesh
nylife
US
Hi Mahesh...your scenario is close. but I wish for the data to be displayed like this in the grid:
row Prop1 Prop2 Prop3
1 abc mahesh xyz
2 123 sandeep 456
For Prop2 I need to increment by +1 with each new row. Does that make sense I hope?
THank you,
Caesar
nylife
US
row Prop1 Prop2 Prop3
1 abc (1).person xyz
2 123 (2).person 456
...etc
nylife
US
Is there an iterator property such as <CURRENT> for repeat grid? I tried this but it doesn't work:
row Prop1 Prop2 Prop3
1 abc (<CURRENT>).person xyz
2 123 (<CURRENT>).person 456
Accepted Solution
Pegasystems Inc.
US
Hi Caesar,
Your scenario is not possible practically because the data Prop2={person="mahesh", person="sandeep", person="vijay"} of PageList2 is part of the PageList1. If you represent this data in the database format, PageList1 will be represented in table1 and PageList2 will be table2 data which is linked with table1.
So each row in table1 will have the data of {Prop1, Prop2, Prop3} where Prop2 PageList data will be available in table2, so to display the data of Prop2 from table2 you need to use the subreport as per my knowledge.
Logic:
- In your for loop iteration when count=1 -> You get the first record from database i.e. Prop1="abc", Prop2={person="mahesh", person="sandeep", person="vijay"}, Prop3="xyz"
- When count=2 -> you get the second record from database i.e. Prop1="123", Prop2={person="a1", person="a2"}, Prop3="456"
- So you cant display the Prop2="mahesh" in first record and Prop2="sandeep" for the second record because Prop2="sandeep" is related to the first record data of PageList1.
Real time example: Employee PageList1 is linked with Address PageList2 in it, now you cant display the Address of Employee2 into the Address of Employee1.
row Prop1 Prop2 Prop3
Hi Caesar,
Your scenario is not possible practically because the data Prop2={person="mahesh", person="sandeep", person="vijay"} of PageList2 is part of the PageList1. If you represent this data in the database format, PageList1 will be represented in table1 and PageList2 will be table2 data which is linked with table1.
So each row in table1 will have the data of {Prop1, Prop2, Prop3} where Prop2 PageList data will be available in table2, so to display the data of Prop2 from table2 you need to use the subreport as per my knowledge.
Logic:
- In your for loop iteration when count=1 -> You get the first record from database i.e. Prop1="abc", Prop2={person="mahesh", person="sandeep", person="vijay"}, Prop3="xyz"
- When count=2 -> you get the second record from database i.e. Prop1="123", Prop2={person="a1", person="a2"}, Prop3="456"
- So you cant display the Prop2="mahesh" in first record and Prop2="sandeep" for the second record because Prop2="sandeep" is related to the first record data of PageList1.
Real time example: Employee PageList1 is linked with Address PageList2 in it, now you cant display the Address of Employee2 into the Address of Employee1.
row Prop1 Prop2 Prop3
1 abc mahesh xyz
2 123 sandeep 456
Note: This requirement is not true as per me because you are trying to display the second record of PageList2 in the second record of PageList1, which is irrelavent as second record of PageList2(sandeep) is part of the first record in PageList1(abc).
Let me know if you still need further clarification.
Regards
Mahesh
nylife
US
Thank you, I understand your clarification.