Order and Service Management (Communications Industry) (MOSC)

MOSC Banner

Display Record count using Groovy in OM Extension

Hi All,

Trying to display record count using PVO but facing errors, below is the script which we are using. Can any one suggest with correct script

Object getTaskNum_cnt(String TaskName)

{

int Task_cnt01 =0;

def taskPVO = context.getViewObject("oracle.apps.projects.foundation.projectDefinition.publicView.FinancialTaskPVO");

def vc = taskPVO.createViewCriteria();

def vcrow = vc.createViewCriteriaRow();

vcrow.setAttribute("TaskName", TaskName);

def rowset = taskPVO.findByViewCriteria(vc, -1);

def TaskNum = rowset.first();

while(rowset.hasNext())

{

Task_cnt01 = Task_cnt01+1;

}

return Task_cnt01;

}

Also tried to display direct count using rowset.count(); function.

Thanks in Advance.

Regards,

Jhansi

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center