'OR' operator is not working in 'IF' condition!

Hello,
I am trying to put some validation/code, by using the 'IF' condition as below with 'OR' operator, but, its not working(am not getting any syntax erorr), pls. let reframe correctly, pls. note that 2 periods after my_form, am using it to point the text object/drop-down, bcz until run time i dont know the object's name
if ((xfa.resolveNode("my_form.." + myArrayReq[i]).rawValue == null) || (xfa.resolveNode("my_form.." + myArrayReq[i]).rawValue == "")){
// my code come here, like populate some variable
Thank you

Thank you.
Also the way you are passing the array through the xfa.resolveNode may be incorrect. Test using console.println or an app.alert.
For me, its working, yes i tested it, its fine.
Any comments?
Thank you

Similar Messages

  • Delete operation is not working to delete selected row from ADF table

    Hi All,
    We are working on jdev 11.1.1.5.3. We have one ADF table as shown below. My requirement is to delete a selected row from table, but it is deleting the first row only.
    <af:table value="#{bindings.EventCalendarVO.collectionModel}" var="row"
    rows="#{bindings.EventCalendarVO.rangeSize}"
    emptyText="#{bindings.EventCalendarVO.viewable ? applcoreBundle.TABLE_EMPTY_TEXT_NO_ROWS_YET : applcoreBundle.TABLE_EMPTY_TEXT_ACCESS_DENIED}"
    fetchSize="#{bindings.EventCalendarVO.rangeSize}"
    rowBandingInterval="0"
    selectedRowKeys="#{bindings.EventCalendarVO.collectionModel.selectedRow}"
    selectionListener="#{bindings.EventCalendarVO.collectionModel.makeCurrent}"
    rowSelection="single" id="t2" partialTriggers="::ctb1 ::ctb3"
    >
    To perform delete operation i have one delete button.
    <af:commandToolbarButton
    text="Delete"
    disabled="#{!bindings.Delete.enabled}"
    id="ctb3" accessKey="d"
    actionListener="#{AddNewEventBean. *deleteCurrentRow* }"/>
    As normal delete operation is not working i am using programatic approach from bean method. This approach works with jdev 11.1.1.5.0 but fails on ver 11.1.1.5.3
    public void deleteCurrentRow (ActionEvent actionEvent) *{*               DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding dcItteratorBindings =
    bindings.findIteratorBinding("EventCalendarVOIterator");
    // Get an object representing the table and what may be selected within it
    ViewObject eventCalVO = dcItteratorBindings.getViewObject();
    // Remove selected row
    eventCalVO.removeCurrentRow();
    it is removing first row from table still. Main problem is not giving the selected row as current row. Any one point out where is the mistake?
    We have tried the below code as well in deleteCurrentRow() method
    RowKeySet rowKeySet = (RowKeySet)this.getT1().getSelectedRowKeys();
    CollectionModel cm = (CollectionModel)this.getT1().ggetValue();
    for (Object facesTreeRowKey : rowKeySet) {
    cm.setRowKey(facesTreeRowKey);
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)cm.getRowData();
    rowData.getRow().remove();
    The same behavior still.
    Thanks in advance.
    Rechin
    Edited by: 900997 on Mar 7, 2012 3:56 AM
    Edited by: 900997 on Mar 7, 2012 4:01 AM
    Edited by: 900997 on Mar 7, 2012 4:03 AM

    JDev 11.1.1.5.3 sounds like you are using oracle apps as this not a normal jdev version.
    as it works in 11.1.1.5.0 you probably hit a bug which you should file with support.oracle.com...
    Somehow you get the first row instead of the current row (i guess). You should debug your code and make sure you get the current selected row in your bean code and not the first row.
    This might be a problem with the bean scope too. Do you have the button (or table) inside a region? Wich scope does the bean have?
    Anyway you can try to remove the iterator row you get
    public void deleteCurrentRow (ActionEvent actionEvent) { DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding dcItteratorBindings =
    bindings.findIteratorBinding("EventCalendarVOIterator");
    dcItteratorBindings.removeCurrentRow();Timo

  • LIKE operator is not working in SQL Query in XML file

    Hi Gurus,
    LIKE operator is not working in SQL query in XML template.
    I am creating a PDF report in ADF using Jdeveloper10g. The XML template is as follows
    <?xml version="1.0" encoding="WINDOWS-1252" ?>
    <dataTemplate name="catalogDataTemplate" description="Magazine
    Catalog" defaultPackage="" Version="1.0">
    <parameters>
    <parameter name="id" dataType="number" />
    <parameter name="ename" dataType="character" />
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[
       SELECT ename, empno, job, mgr from EMP where deptno=:id and ename LIKE :ename || '%']]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="EmployeeInfo" source="Q1">
    <element name="EmployeeName" value="ename" />
    <element name="EMPNO" value="empno" />
    <element name="JOB" value="job"/>
    <element name="MANAGER" value="mgr" />
    </group>
    </dataStructure>
    </dataTemplate>
    if i pass the parameter value of :ename from UI, it doesn't filter. But if I give ename = :ename it retrieves the data. Can anyone help me why LIKE operator doesn't work here?
    Appreciate your help,
    Shyamal
    email: [email protected]

    Hi
    Well for a start, you are doing some very strange conversions there. For example...
    and to_char(a.msd, 'MM/DD/YYYY') != '11/11/2030'
    and to_char(a.msd, 'MM/DD/YYYY') != '10/10/2030'If a.msd is a date then you should e converting on the other side ie.
    and a.msd != TO_DATE('11/11/2030', 'MM/DD/YYYY')
    and a.msd != TO_DATE('10/10/2030', 'MM/DD/YYYY')Also, you may want to take into consideration nothing being input in :P2_ITEM_NUMBER like this...
    AND INSTR(a.item_number,NVL(:P2_ITEM_NUMBER,a.item_number)) > 0Is item number actually a number or char field? If it's a number, you want to explicitly convert it to a string for using INSTR like this...
    AND INSTR(TO_CHAR(a.item_number),NVL(TO_CHAR(:P2_ITEM_NUMBER),TO_CHAR(a.item_number))) > 0?
    Cheers
    Ben

  • HT201407 The shake operation is not working on my iPhone, can anyone help me with it plz

    The shake operation is not working on my iPhone, can anyone help me with it plz

    All depnds what your using it for..  If it's an app, may be a delay in the app doing an update to be compaitible with iOS 6.  If its for an Apple app, then you need to check the settings for that specific app.

  • Calculation formula userexit not working for multiple condition types

    Hi,
    we have a problem in the CRM ISA-B2B scenario where the custom user exit is only working for single condition type.
    but we need it for multiple condition types .
    the value of the subtotal is not being retrieved for multiple conditions. at a time only one condition value is being retrieved and shown in the webshop - shopping basket.
    for ex:
    we have scenario 1 where Y001 -Freight condition type is applicable for one customer.and Y002 is applicable for another customer.
    when we are trying to show the subtotal condition value in the webshop by using a single custom user exit in the pricing procedure it is only working for either of the above 2 customers depending on the VMC cache status.
    is there any problem if use the single user exit for both condition types?
    and if it needs to be differentiated how exactly we can do that with the same logic in the java class.
    Thanks in advance,
    PSR.

    Hi Arshi,
    below is the code:
    public class ZValFormula_ZZWI1 extends ValueFormulaAdapter {
         private static String zzwi = "ZZWI1";
         private static char  zzwiC = '@';
         private static UserexitLogger userexitlogger = new UserexitLogger(
         ZValFormula_ZZWI1.class);
         public BigDecimal overwriteConditionValue(IPricingItemUserExit item,
                   IPricingConditionUserExit condition) {
              ICurrencyValue val = condition.getConditionValue();
              userexitlogger.writeLogDebug( "value saved for " + zzwi + " (" + zzwiC + ") = "
                        + val.getValueAsString());
              item.setSubtotal( zzwiC, val.getValue());
              return val.getValue();
    hope this would give more idea to look at the problem.
    Thanks,
    PSR

  • Opera mini not working after updating software fro...

    i bought a nokia 6303c on feburary 2010 , at that time the software version of my mobile was v9.10 but after two or three months i noticed that my calculator was missing an some other menu function are also missing. so i searched in internet and got information in nokia discussion that that missing calculator is software problem. So i decided to go to nearest nokia care for solution of my problem, where they updated my software to v10.12 i got my calculator back, but from the day opera mini is not working properly, then after one month i again go to nokia care , then they again updated my software , but problem remains same. so i asked them to please give me old version in my mobile but they told me that it is impossible to downgrade to 9.10,  i m fed up of this problem. In comparison of this new version my old version is much better.. please help. might be this is also a bug of software nokia gives that useless lifetool and nothing improvement is there.

    Could be a problem with the App and that it may not support IOS 7.1.1 yet and need updating.

  • Expired certificate and opera mini not working

    i had a problem while i was installing my whatsap,it always says "expired certificate" and my opera mini is not working,says check date settings.please help

    As this is your first post upon the forum an indication as to what device this appertains would be helpful.
    Happy to have helped forum in a small way with a Support Ratio = 37.0

  • Sales doc copy control not working with price condition

    Here's the situation.
    For OR sales document I have  Procedure ZSALES and price conditions Z001
    For a QT Sales document I have Procedure ZQUOTE which does not have a Z001 condition in that procedure.
    If I create an OR (with the proper customer / matieral) the Z001 populates, based on it's defined record.
    If I then create another OR with reference to the original OR, the Z001 populates with no problem.
    Up to now everything's fine, now here's the probem......
    If I create an OR with reference to a QT, the Z001 does not populate in the OR order.I know there is no Z001 in the QT for it to copy from, but if I do [New Pricing] in the order it still does not come in.(I've tried [new Pricing] with Pricing type A..G)
    I have found OSS Note 413066, but this is in reference to 46c systems. we are on ECC 6.0
    any ideas ?

    Hi Bill,
    If PP assigned for both are different it's not going to populate field even if you are redertermining price, since it would be following the PP of Quotation (ZQUOTE), not Sales Order (ZSALES) because it's gonna copy the elements of that PP in order. Are your PP assigned are same or different?
    Hope this will answer your query
    Regards
    SD

  • Nokia 5130xm opera mini not working?

    sir my defult browser that is opera mini not open  since last two days. it show an error invalid app then not open after thet plz help me.

    http://www.google.ie/url?sa=t&source=web&cd=1&ved=​0CBMQFjAA&url=http%3A%2F%2Fwww.opera.com%2Fmobile%​...
    you need to have enough free space or a phone with sufficent capacity to run this
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • 6270 OPERATING KEYS NOT WORKING

    Keys of pnone are not working. I cant receive calls without sliding my phone. I cant read messages or see miss calls

    Try upgrading your phone's firmware. Take it to your nearest service center for that.

  • My cellular connection (swedish 3 operator) does not work after update to iOs 8.3

    After I updated my iPad mini from iOs 8.1.3 to 8.3 my cellular connection has stoped working. It connects but the apps don´t recongnice it. The operator is the swedish network "3" (Three),

    Hello svenakealb,
    It appears you are unable to connect with cellular networks using your iPad. The following article provides troubleshooting steps for this issue, which you may find helpful:
    If you can't connect to a cellular network or cellular data - Apple Support
    Get help with No Service or Searching, cellular network, and 4G LTE issues on your iPhone or iPad (cellular model).
    If you see No Service or Searching 
    If you see No Service or Searching on your device, or can't connect to a cellular network or cellular data, follow these steps: 
    Check your coverage area to make sure you're in an area with cellular network coverage.
    If you can't connect to a cellular network, make sure cellular data is on in Settings > Cellular.
    If you're traveling internationally, make sure your device is set up for data roaming. Go to Settings > Cellular > Data Roaming.
    Restart your iPhone or iPad.
    Check for a Carrier Settings Update.
    Remove the SIM card then reinsert it. If the SIM card is damaged, worn, or bent, or doesn't fit in the SIM tray, contact your carrier.
    Try another location. If possible, see if other devices are able to connect to your carrier's network in that location. 
    Contact your carrier to:
    Verify that your account is active and in good standing.
    Make sure there are no outages in your area.
    Check that your device is not blocked from receiving cellular services and set up with the right data plan. 
    Update your iPhone or iPad to the latest version of iOS.
    If you can connect to 3G but not 4G LTE
    If you can connect your iPhone or iPad to 3G but not 4G LTE, make sure your device is compatible with LTE. Go to Settings > Cellular > Enable LTE. Identify your iPhone and compare its model number with the list of supported LTE carriers for your country location. Or identify your iPad and compare its model number with the list of supported LTE carriers for your country location. LTE options might vary depending on your carrier's network.
    Thank you for contributing to Apple Support Communities.
    Cheers,
    Bobby_D

  • Formula with operator * or / not working whereas + or - is fine

    Hi,
    I do not understand why the following Formula code gives results for OPERATOR = '+' or '-' and no record generated for OPERATOR = '*' or '/' :
    FOREACH STEP IN SELECTION.
       { ZCOPAKF2, TA2 }  =
          { ZCOPAKF1, STEP }  OPERATOR
          { 0QUANTITY, STEP }.
    ENDFOR.
    Thxs for your help.
    LauQ

    For '*' & '/' to work both the operands should not be equal to 0. Where as for '+' & '-' if any of the operands is not '0' it will generate new record.
    Check the value of your operands.

  • Outbound merge not working with where conditions in 10g

    Hi,
    These are my database details both remote and local database
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for HPUX: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - ProductionI am doing a merge into a remote database from a local table using below query...
    MERGE into sap_mmd_po_all@cosmic_dev.somedomainname trg using (select * from sap_mmd_cmas_po where upload_flag in ('I','U')) src
      on (trg.PO_NO=src.PO_NO and trg.LINE_DISTRIB_SEQ=src.LINE_DISTRIB_SEQ)
      WHEN MATCHED THEN
        update set
          trg.PO_STATUS_FLG=src.PO_STATUS_FLG,
          trg.SHIP_TO_FACILITY_CD=src.SHIP_TO_FACILITY_CD,
          trg.DELV_TO_PHONE_NO=src.DELV_TO_PHONE_NO,
          trg.DELV_TO_NM=src.DELV_TO_NM,
          trg.DELV_TO_ADDRESS_1=src.DELV_TO_ADDRESS_1,
          trg.PO_ITEM_NO=src.PO_ITEM_NO,
          trg.ITEM_DESCRP=src.ITEM_DESCRP,
          trg.PARTY_NM=src.PARTY_NM,
          trg.VENDOR_ITEM_ID=src.VENDOR_ITEM_ID,
          trg.PO_LN_CRTE_DT=src.PO_LN_CRTE_DT,
          trg.BILL_UOM_CD=src.BILL_UOM_CD,
          trg.COMMODITY_CD=src.COMMODITY_CD,
          trg.COMMODITY_NM=src.COMMODITY_NM,
          trg.BSNSS_UNIT_NO=src.BSNSS_UNIT_NO,
          trg.PO_LN_ORD_QTY=src.PO_LN_ORD_QTY,
          trg.DISTRIB_AMT=src.DISTRIB_AMT,
          trg.PO_LN_DEL_IND=src.PO_LN_DEL_IND,
          trg.PO_DEL_IND=src.PO_DEL_IND,
          trg.PO_TYPE=src.PO_TYPE,
          trg.DOC_DATE=src.DOC_DATE,
          trg.CRTE_DT_TM=src.CRTE_DT_TM,
          trg.UPD_DT_TM=systimestamp,
          trg.SOURCE_SYSTEM=src.SOURCE_SYSTEM,
          trg.PO_LN_LST_CHNGE_DT=src.PO_LN_LST_CHNGE_DT,
          trg.TXJCD=src.TXJCD,
          trg.PLANT=src.PLANT
          where (src.upload_flag='U')--if i remove this then it is working
      WHEN NOT MATCHED THEN
        insert( trg.PO_NO,
                trg.LINE_DISTRIB_SEQ,
                trg.PO_STATUS_FLG,
                trg.SHIP_TO_FACILITY_CD,
                trg.DELV_TO_PHONE_NO,
                trg.DELV_TO_NM,
                trg.DELV_TO_ADDRESS_1,
                trg.PO_ITEM_NO,
                trg.ITEM_DESCRP,
                trg.PARTY_NM,
                trg.VENDOR_ITEM_ID,
                trg.PO_LN_CRTE_DT,
                trg.BILL_UOM_CD,
                trg.COMMODITY_CD,
                trg.COMMODITY_NM,
                trg.BSNSS_UNIT_NO,
                trg.PO_LN_ORD_QTY,
                trg.DISTRIB_AMT,
                trg.PO_LN_DEL_IND,
                trg.PO_DEL_IND,
                trg.PO_TYPE,
                trg.DOC_DATE,
                trg.CRTE_DT_TM,
                trg.UPD_DT_TM,
                trg.SOURCE_SYSTEM,
                trg.PO_LN_LST_CHNGE_DT,
                trg.TXJCD,
                trg.PLANT)
        values( src.PO_NO,
                src.LINE_DISTRIB_SEQ,
                src.PO_STATUS_FLG,
                src.SHIP_TO_FACILITY_CD,
                src.DELV_TO_PHONE_NO,
                src.DELV_TO_NM,
                src.DELV_TO_ADDRESS_1,
                src.PO_ITEM_NO,
                src.ITEM_DESCRP,
                src.PARTY_NM,
                src.VENDOR_ITEM_ID,
                src.PO_LN_CRTE_DT,
                src.BILL_UOM_CD,
                src.COMMODITY_CD,
                src.COMMODITY_NM,
                src.BSNSS_UNIT_NO,
                src.PO_LN_ORD_QTY,
                src.DISTRIB_AMT,
                src.PO_LN_DEL_IND,
                src.PO_DEL_IND,
                src.PO_TYPE,
                src.DOC_DATE,
                systimestamp,
                src.UPD_DT_TM,
                src.SOURCE_SYSTEM,
                src.PO_LN_LST_CHNGE_DT,
                src.TXJCD,
                src.PLANT)
                where src.upload_flag='I'--if i remove this then it is working
                ;And it is throwing an error like...
    SQL Error: ORA-00904: "A3"."UPLOAD_FLAG": invalid identifierBut when I replace the remote table name with local table name then query is functioning fine...
    table structure in local database..
    CREATE TABLE SAP_MMD_CMAS_PO
       (     "PO_NO" VARCHAR2(10 BYTE) NOT NULL ENABLE,
         "LINE_DISTRIB_SEQ" NUMBER NOT NULL ENABLE,
         "PO_STATUS_FLG" VARCHAR2(40 BYTE),
         "SHIP_TO_FACILITY_CD" VARCHAR2(100 BYTE),
         "DELV_TO_PHONE_NO" VARCHAR2(50 BYTE),
         "DELV_TO_NM" VARCHAR2(100 BYTE),
         "DELV_TO_ADDRESS_1" VARCHAR2(1000 BYTE),
         "PO_ITEM_NO" VARCHAR2(100 BYTE),
         "ITEM_DESCRP" VARCHAR2(200 BYTE),
         "PARTY_NM" VARCHAR2(1000 BYTE),
         "VENDOR_ITEM_ID" VARCHAR2(100 BYTE),
         "PO_LN_CRTE_DT" TIMESTAMP (6),
         "BILL_UOM_CD" VARCHAR2(50 BYTE),
         "COMMODITY_CD" VARCHAR2(50 BYTE),
         "COMMODITY_NM" VARCHAR2(50 BYTE),
         "BSNSS_UNIT_NO" VARCHAR2(50 BYTE),
         "PO_LN_ORD_QTY" NUMBER,
         "DISTRIB_AMT" NUMBER,
         "PO_LN_DEL_IND" VARCHAR2(10 BYTE),
         "PO_DEL_IND" VARCHAR2(10 BYTE),
         "PO_TYPE" VARCHAR2(10 BYTE),
         "DOC_DATE" TIMESTAMP (6),
         "CRTE_DT_TM" TIMESTAMP (6),
         "UPD_DT_TM" TIMESTAMP (6),
         "SOURCE_SYSTEM" VARCHAR2(100 BYTE),
         "PO_LN_LST_CHNGE_DT" TIMESTAMP (6),
         "TXJCD" VARCHAR2(50 BYTE),
         "PLANT" VARCHAR2(10 BYTE),
         "UPLOAD_FLAG" VARCHAR2(1 BYTE),
          PRIMARY KEY ("PO_NO", "LINE_DISTRIB_SEQ")
    --table structure in remote database table
    CREATE TABLE SAP_MMD_PO_ALL
       (     "PO_NO" VARCHAR2(10 BYTE) NOT NULL ENABLE,
         "LINE_DISTRIB_SEQ" NUMBER NOT NULL ENABLE,
         "PO_STATUS_FLG" VARCHAR2(40 BYTE),
         "SHIP_TO_FACILITY_CD" VARCHAR2(100 BYTE),
         "DELV_TO_PHONE_NO" VARCHAR2(50 BYTE),
         "DELV_TO_NM" VARCHAR2(100 BYTE),
         "DELV_TO_ADDRESS_1" VARCHAR2(1000 BYTE),
         "PO_ITEM_NO" VARCHAR2(100 BYTE),
         "ITEM_DESCRP" VARCHAR2(200 BYTE),
         "PARTY_NM" VARCHAR2(1000 BYTE),
         "VENDOR_ITEM_ID" VARCHAR2(100 BYTE),
         "PO_LN_CRTE_DT" TIMESTAMP (6),
         "BILL_UOM_CD" VARCHAR2(50 BYTE),
         "COMMODITY_CD" VARCHAR2(50 BYTE),
         "COMMODITY_NM" VARCHAR2(50 BYTE),
         "BSNSS_UNIT_NO" VARCHAR2(50 BYTE),
         "PO_LN_ORD_QTY" NUMBER,
         "DISTRIB_AMT" NUMBER,
         "PO_LN_DEL_IND" VARCHAR2(10 BYTE),
         "PO_DEL_IND" VARCHAR2(10 BYTE),
         "PO_TYPE" VARCHAR2(10 BYTE),
         "DOC_DATE" TIMESTAMP (6),
         "CRTE_DT_TM" TIMESTAMP (6),
         "UPD_DT_TM" TIMESTAMP (6),
         "SOURCE_SYSTEM" VARCHAR2(100 BYTE),
         "PO_LN_LST_CHNGE_DT" TIMESTAMP (6),
         "TXJCD" VARCHAR2(50 BYTE),
         "PLANT" VARCHAR2(10 BYTE),
         "DELETE_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N',
          PRIMARY KEY ("PO_NO", "LINE_DISTRIB_SEQ")
      )It seems to me like a bug, but not quite sure...
    your suggestions are appreciated.
    Thanks,
    Ravi Kumar
    Edited by: ravikumar.sv on Dec 14, 2009 1:31 PM
    Commented the where conditions in merge query

    Hi,
    Yes, i hit the same error....
    SQL> ed
    Wrote file afiedt.buf
      1  merge into hr.test1@test_dblink using test2 on (test1.id = test2.id)
      2  when matched then update set test1.col1=test2.col2 where test2.id=2
      3* when not matched then insert (id, col1) values(test2.id,test2.col2)
    SQL> /
    merge into hr.test1@test_dblink using test2 on (test1.id = test2.id)
    ERROR at line 1:
    ORA-00904: "A3"."ID": invalid identifier
    ORA-02063: preceding line from TEST_DBLINKBUT here is a work around...to add the where condition while joining(ON) itself.
    SQL> ed
    Wrote file afiedt.buf
      1  merge into hr.test1@test_dblink using test2 on (test1.id = test2.id and tes
    t2.id=2)
      2  when matched then update set test1.col1=test2.col2
      3* when not matched then insert (id, col1) values(test2.id,test2.col2)
    SQL> /
    2 rows merged.
    SQL>For you the condition would be...
    on (trg.PO_NO=src.PO_NO and trg.LINE_DISTRIB_SEQ=src.LINE_DISTRIB_SEQ AND src.upload_flag='U')cheers,
    Edited by: Avinash Tripathi on Dec 14, 2009 2:53 PM

  • The Or operator is not working

    I have Crystal Reports XI, and I can't get the Or operator to work in the record selection formula.  I can get each individual line to work, but once I put an Or statement in, nothing shows up in my report.
    {CP_ORDLIN.QTY_BO} > 0 Or
    {CP_ORDHDR.CODE_STAT_ORD} <> "Q"
    Each line works individually, but once I put the Or operator between them, I get nothing.

    Hello Rob,
    Steve's original question concerned the selection filter:
    {CP_ORDLIN.QTY_BO} > 0 OR {CP_ORDHDR.CODE_STAT_ORD} = "Q"
    However, Steve's subsequent post has a Where clause:
    "CP_ORDHDR"."CODE_STAT_ORD"'Q' AND "CP_ORDLIN"."SEQ_LINE_ORD"=10 OR "CP_ORDLIN"."QTY_BO">0
    The latter statement is more restrictive than the former, since the AND operator takes precedence over OR.  For example:
    False AND True OR False == (False AND True) OR False == False OR False == False
    Boolean algebra is distributive, so
    a AND b OR c == (a AND b) Or c == (a OR c) AND (b OR c)
    so the second expression above becomes
    ("CP_ORDHDR"."CODE_STAT_ORD"'Q' OR "CP_ORDLIN"."QTY_BO">0) AND ("CP_ORDLIN"."SEQ_LINE_ORD"=10 OR "CP_ORDLIN"."QTY_BO">0)
    (so I used to do this for a living once...)
    Since the expression Steve originally asked about was different from the SQL, I wanted to know where the additional AND clause had come from.
    Sincerely,
    Ted Ueda
    ps.  Graham's referring to [Short-Circuit Evaluation|http://en.wikipedia.org/wiki/Short-circuit_evaluation] that Crystal supports.  This is useful if you want to evaluate a condition such as:
    (1 / {?x} > 10)
    which is problematic if there's a possibility that {?x} can be zero, since that would raise a divide by zero exception.  So you'd write:
    ({?x} = 0) OR (1/{?x} > 10)
    and that's safe, since if {?x} is zero, the right-hand size of the OR would be True and the left-hand size won't have to be evaluated.
    This is equivalent to:
    If {?x} = 0 Then
        True
    Else If (1/{?x} > 0) Then
        True
    Else
        False

  • Audigy 4 EAX not working in CounterStrike Condition Z

    Hi, I need help with my new sound card. I am running Windows XP Home edition. I recently bought the Audigy 4 SoundBlaster. Things work great when I am listening to music or just talking in ventrilo. However whenever I load my CounterStrike Condition Zero the EAX effects seem to turn off. I bought the sound card for the enhanced game play but it is useless if it's not gonna work in the game. Could someone please help me asap. I am getting very frustrated and don't know what to do to fix the problem.

    Make sure eax is enabled ingame by typing s_eax in the console. Sometimes even if you set in on at the options it goes off ingame.

Maybe you are looking for

  • Quicktime does not work in firefox 24 in windows 8 desktop mode

    I am running Firefox 24 on Windows 8 Pro 64-bit in desktop mode. I have QuickTime Plug-in 7.7.4 installed. But when I try to go http://trailers.apple.com/trailers/ and play trailers all I get is black box and nothing is playing. No prompting to autho

  • I have reset firefox, cleared cache, reinstalled and blocked pop ups, why is it still real slow

    Firefox is very slow, when I go into facebook to play games it takes as long as 5 minutes to load, I try to reload and get the same thing.

  • XML Attribute "inheritance"

    I have a scenario where each Element in a node could be either "User" or "Machine" in scope, which I am defining with an attribute. Some nodes will be all one or the other scope, and some may have a mix of elements. Currently I am defining scope with

  • Broadband faults caused by RAIN

    Hi can anyone tell me if my only option is to change service provider. My broad band keeps dropping out and is never up to the line max given which was 3.5Mbit. Since raising a new fault recently BT Openreach engineer has been in attendance and confi

  • RFC destination in FM for development, quality & production server

    Hi all, I have a doubt in RFC enabled FMs.. The RFC destination wil be different for dev, quality & prodn. Whn we do dev, we wil use RFC for Dev in Code & execute. Do we need to change the code whn we move to quality & thn again whn moving to prdn? H