Question

1
Replies
927
Views
AvulaVenkataR Member since 2016 3 posts
HCL TECHNOLOGIES LTD
Posted: 2 years ago
Last activity: 2 years 6 months ago
Closed

Pass Page List Index to Java

Hi ,

Having requirement like pass pyNote property value as page list Index dynamically in java code for that implemented java code

And copy the Current page SampleRadioButton property value to pyWorkPage.SamplePageList(IndexValue).SampleRadioButton

Here i have to pass IndexValue dymaically. while tracing getting below error

The property pyWorkPage.SamplePageList was of mode Page List while com.pega.pegarules.data.internal.clipboard.ClipboardPropertyImpl.getPageValue() was expecting Page mode.  Details: (none) 

But if page mentioned as pyWorkPage.SamplePageList(1) value is posting .

Java code with out dynamic.

{

String Index = myStepPage.getString("pyNote").toString();

int IndexValue = Integer.parseInt(Index);

ClipboardPage WorkPage = tools.findPage("pyWorkPage.SamplePageList(1)");

String Str = myStepPage.getString("SampleRadioButton").toString();

WorkPage.getProperty(".SampleRadioButton").setValue(Str);

}

Tried below java code for dynamic purpose.

{

String Index = myStepPage.getString("pyNote").toString();

int IndexValue = Integer.parseInt(Index);

ClipboardPage WorkPage = tools.findPage("pyWorkPage.SamplePageList(IndexValue)");

String Str = myStepPage.getString("SampleRadioButton").toString();

WorkPage.getProperty(".SampleRadioButton").setValue(Str);

}

how we can achieve above solution ?

***Updated by moderator: Lochan to add Categories***

Data Integration Java and Activities
Moderation Team has archived post
Share this page LinkedIn