Discussion

741
Views
sahil kandhari (sahilk57)
virtusa
Senior Engineer
virtusa
IN
sahilk57 Member since 2014 1 post
virtusa
Posted: March 28, 2016
Last activity: March 28, 2016
Posted: 28 Mar 2016 3:46 EDT
Last activity: 28 Mar 2016 3:46 EDT
Closed

API from 2.0 to 3.2

String strPageName= "PharmacySearch";
String propName="24hour";
String strSQLStatment=tools.getParameterValue("sql");

Page objResultsPage=createPage("Code-Pega-List",strPageName);
Property objClassProperty=objResultsPage.getProperty("pyObjClass");
objResultsPage.setValue("pyMaxRecords","0");

if (objResultsPage.RDBExecute(strSQLStatment))
{
    java.util.Enumeration enum=objResultsPage.getProperty("pxResults").forEach();
        
        while (enum.hasMoreElements())
        {
            Property row = (Property) enum.nextElement();
            Page rowPage = row.getAsPage();

            String strKey = rowPage.getValue(propName);
            rowPage.setValue("pyLabel", strKey);
            }

}
else
{
    
}

 

I am getting below issue while upgrading from version 5 application to version 7.Enum Syntax issue and method issue.

Test compilation failed: ----------
1. ERROR in /Rule_Obj_Activity_UHG_FW_Audit_Data_Pharmacy_ExecuteRDBMethods1_Action_20160328T074222_855_GMT.java (at line 257)
java.util.Enumeration enum = objResultsPage.getProperty("pxResults").forEach();
^^^^
Syntax error on token "enum", delete this token

 

Enum Issue is solved by renaming to any random string but still getting  issue with using these methods.

the method createPage(String, String)  and getParameterValue(String) is undefined for the type.

Any help is appreciated.

Data Integration Java and Activities
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Discussion, please write a new Discussion.