Retrieving Program Activity Number through PX

Hi there,

I am trying to retrieve Program Activity Number through PX,
ICell prognum = row.getCell(ProgramConstants.ATT_GENERAL_INFO_NUMBER);
with this, I am getting null. M able to retrieve Program Name though.

Thanks in advance.

Add Comment
3 Answer(s)

Hi Nagma,

I see that you are asking to a ROW about the field GeneralInfoNumber. 
To wich table is related that row?
The ATT_GENERAL_INFO:NUMBEr costant is only available on the task object (row.getReferent()) and not he row itself.

Agile Angel Answered on November 3, 2016.
Add Comment

Use IRow.getReferent();

Agile User Answered on November 9, 2016.
Add Comment

Hi guys,

Thanks! It worked with IRow.getReferent() for Agile 9.3.3. However, the same one is not working for 9.3.4. The number is returning null. It only retrieves the name. Any suggestions please…

Agile Talent Answered on December 1, 2016.

can you please share the new code with the referent?

on December 1, 2016.

Hi Antonio,

Here is the code:

while(iterator.hasNext()){
IRow row = (IRow)iterator.next();

String prognum = row.getReferent().getCell(ProgramConstants.ATT_GENERAL_INFO_NUMBER).toString();
System.out.println(“Program number in String is =”+prognum);
IProgram ip = (IProgram).currSession.getObject(IProgram.OBJECT_TYPE,prognum);
System.out.println(“Program activity number = “+ip);
}

on December 1, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.