Maximo Wire - The IBM Maximo Help & Discussion Forum
May 20, 2012, 10:42:35 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: calculating by sum function and validating......confused lil bitwith mbo concept  (Read 498 times)
0 Members and 1 Guest are viewing this topic.
aashish
Newbie
*

Karma: 0
Posts: 4


View Profile
« on: December 09, 2010, 06:24:18 am »

Hi Frns ,
I am also trying to same concept ,
bt my problem is with mbosetremote ....its nt fetching value at "itemcost" field ..value is coming only zero evrytime...
Pls Sugggest me..
==============================================================================
                    SqlFormat sqlf2 = new SqlFormat("1=2");
                    Mbo mbo=getMboValue().getMbo();
                              MboRemote mboremote = mbo.getOwner();                                 //owner is Asset
               MboSetRemote ttcost = mboremote.getMboSet("$client", "CLIENT", sqlf2.format());
                 
               if(mbo != null )     
         {                       
            double assetcost=mboremote.getDouble("totalitemcost");
                                double displayitemcost=mboremote.getDouble("itemcost");             // nt fetching value,alws coming 0 value
                 double totalcost=ttcost.sum("itemcost");                                 // nt fetching value,alws coming 0 value
                           double diffcost=Math.abs(assetcost-totalcost);
                                                 
                             Object param[] = {            diffcost  };
================================================================================================
Logged
Ethen
Global Moderator
Sr. Member
*****

Karma: 16
Posts: 302



View Profile WWW
« Reply #1 on: December 13, 2010, 09:12:43 pm »

I t hink you are supposed to set variables in SqlFormat before using it.
look at some examples..

I am not completely sure.. its been long i have done any maximo coding.. so look ast some example of sqlformat.
Logged

regards,

Ethen...
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!