Maximo Open Forum

Expand all | Collapse all

How does operandMode / operandModeOR work on a SOAP request?

  • 1.  How does operandMode / operandModeOR work on a SOAP request?

    Posted 30 days ago
      |   view attached
    Hi,

    I am trying to develop a Query Web Service. Attached is the sample SOAP Request.

    I am trying to understand how the attributes operandMode and operandModeOR work. I am trying to generate a query of the following nature:

    select * from asset where (upper(status) = 'OPERATING' and siteid = 'BEDFORD' and assetnum = 'A1234') or (exists (select 1 from assetusercust where ((personid = '23456')) and (assetnum = asset.assetnum and isprimary = 1) ));

    But on executing the SOAP request, the query that gets generated is:

    select * from asset where (upper(status) = 'OPERATING' or siteid = 'BEDFORD' or assetnum = 'A1234') or (exists (select 1 from assetusercust where ((personid = '23456')) and (assetnum = asset.assetnum and isprimary = 1) ));

    I suppose this happens (all the operands are OR) because the operandMode has been specified as OR.

    Does the operandModeOR="false" have any effect? I thought this would override OR between the clauses and replace with AND since this has been mentioned as false. But apparently, that does not happen.

    Is there a way to toggle the operands from AND / OR in between and overriding what has been specified by operandMode?


    #Integrations

    ------------------------------
    KAUSHIK KUMAR SAMADDAR
    Compunnel Software Group Inc.
    ------------------------------


  • 2.  RE: How does operandMode / operandModeOR work on a SOAP request?

    Posted 27 days ago
    operandModeOR="false" is not valid tag and there will be no effect. The only tag which can be used is operandMode="OR". If you will not specify this then by default Query will assume operandMode as AND and then all child tags should be considered as AND.

    Did you try using the <WHERE> </WHERE> clause? 

    Thanks,
    Prashant




    ------------------------------
    Prashant Sharma
    EAM360
    ------------------------------



  • 3.  RE: How does operandMode / operandModeOR work on a SOAP request?

    Posted 14 days ago
    Thank you Prashant for confirming that.

    Yes, I did try using WHERE and it works. So, I suppose that using WHERE is the only option here for me.

    ------------------------------
    KAUSHIK KUMAR SAMADDAR
    Compunnel Software Group Inc.
    ------------------------------