Maximo Wire - The IBM Maximo Help & Discussion Forum
May 24, 2012, 12:09:33 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to Maximo Wire, the IBM Maximo help forum. Feel free to register and ask any Maximo related questions you like.
 
  Home Help Search Login Register  
*
Pages: [1]   Go Down
  Print  
Author Topic: What dose it mean for getMboSet("PRLINE").getMbo(0)  (Read 786 times)
0 Members and 1 Guest are viewing this topic.
beginer
Newbie
*

Karma: 0
Posts: 1


View Profile
« on: December 26, 2011, 07:19:01 am »

Hi everyone!
I'm new member. I want to ask someone who knows the code as below:
Quote
    MboRemote poline = getMboValue().getMbo();

    MboRemote prLineRemote = poline.getMboSet("PRLINE").getMbo(0);
    if (prLineRemote == null)
      return;
    poline.setValue("prlinenum", prLineRemote.getInt("prlinenum"), 2L);

Why does they use getMbo(0)? And how about getMbo(1), getMbo(2) , ... getMbo(n)

Thanks for your help.
Regards
Logged
amdisuk
Administrator
Full Member
*****

Karma: -1
Posts: 199


allandonaldson@hotmail.com
View Profile WWW
« Reply #1 on: December 29, 2011, 10:29:06 am »

getMbo(0) will get the first one in the list.

Usually with this sort of code there will only be one entry in the list. For example if you wanted to get as specific PRLINE record you would search for PRLINE records with a specific id. Although the object type returned is an array, it will always have just one entry in the array.

Hope that helps.
Logged

Big Al
Dileep Kumar
Newbie
*

Karma: 0
Posts: 26


View Profile Email
« Reply #2 on: March 21, 2012, 06:33:50 am »

hai

 MboRemote poline = getMboValue().getMbo();      // we are getting mbo from this code

 MboRemote prLineRemote = poline.getMboSet("PRLINE").getMbo(0);   [b]// From Mboset ( collection of records ) we are getting 0th ( 1st Row ) row .[/b]


poline.setValue("prlinenum", prLineRemote.getInt("prlinenum"), 2L); // setting some value to poline mbo
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Recent

TinyPortal v1.0 beta 4 © Bloc
Powered by MySQL Powered by PHP Powered by SMF 1.1.15 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!