(a == b == true)  or  (a == true && b == true)  ?

if I had two booleans, 'a' and 'b', and I wanted to test for them both being true I have always used
if(a == true && b == true){
\\do somthing
but is
if(a == b == true){
\\do somthing
just as valid?
and efficient?
and what about
if(a == b != false){
\\do somthing

Just ramblin'....
I personally feel that using the notation (a == b == c), even if it turns out to mean exactly what you want to mean for a particular case, is a programming mistake because it differs from what a human automatically expects when he sees that "string of equals" notation. (Bravo to the writer of "use if(a &&b)" for saying it exactly like it was meant...)
From math we know that " (3+7)*4 = 40 = 12 + 28 ", because a "string of equals" is a statement that all of the members of the "string" are equivalent. So when we see (a == b == c) in a conditional expression in a program, don't we have the tendency to think of it as "a and b and c all have the same value" (i.e. all true or all false for booleans, all the same number for ints, ...)
In programming there is a different meaning to the "string of equals"; many beginning programmers mistakenly write this " if(a == b == 0) " when they mean this " if(a == 0 && b == 0) ".
...Of course java compiler catches that mistake (if a,b,c are not booleans), because (in the case of ints), this " if(a == b == 0) " is the same as this " if((a == b) == 0) " which written the latter way shows more clearly that it is trying to compare the equality of a boolean (a == b) and an int (0).
However, when a,b,c are boolean, the compiler doesn't complain, but it thinks different from the human math-trained brain. Out of curiosity + laziness, I wrote a little (redundant but simple) program to see some results...
Here is the output (with my later comment inserted with "--->'s):
(false == (false == false)) => false
((false == false) == false) => false
(false == false == false) => false
---> NOT Correct to the human-math-interpretation , all three are the same.
(false == (false == true)) => true
((false == false) == true) => true
(false == false == true) => true
---> NOT Correct to the human-math-interpretation , all three are NOT the same.
(false == (true == false)) => true
((false == true) == false) => true
(false == true == false) => true
---> NOT Correct to the human-math-interpretation , all three are NOT the same.
(false == (true == true)) => false
((false == true) == true) => false
(false == true == true) => false
---> Correct to the human-math-interpretation , all three are NOT the same.
(true == (false == false)) => true
((true == false) == false) => true
(true == false == false) => true
---> NOT Correct to the human-math-interpretation , all three are NOT the same.
(true == (false == true)) => false
((true == false) == true) => false
(true == false == true) => false
---> Correct to the human-math-interpretation , all three are NOT the same.
(true == (true == false)) => false
((true == true) == false) => false
(true == true == false) => false
---> Correct to the human-math-interpretation , all three are NOT the same.
(true == (true == true)) => true
((true == true) == true) => true
(true == true == true) => true
---> Correct to the human-math-interpretation , all three are the same.
Just ramblin'....
/Mel

Similar Messages

  • MBean creation: Encrypted = "true" doesnt work in MBeanAttribute

    Hello!
    I'm trying to create a custom AuthenticationProvider for WLS7 (up to
    date with service packs) and use the
    weblogic.management.commo.WebLogicMBeanMaker to create the necessary
    stubs. The authanticator should remember the system user and its
    password, so I created the following two <MBeanAttribute>s for the
    MBeanType:
    <MBeanAttribute Name="SystemUser" Type="java.lang.String"
    Writeable="true" Default=""system"" CachingDisabled="false"
    CurrencyTimeLimit="-1" Deprecated="false"
    GenerateExtendedAccessors="false" IsIs="false" Iterable="false"
    LegalNull="true" Listen="false" Log="false" NoDoc="false"
    NoDump="false" Readable="true" Visibility="1" />
    <MBeanAttribute Name="SystemPassword" Type="java.lang.String"
    Writeable="true" Default=""password"" Encrypted="true"
    CachingDisabled="false" CurrencyTimeLimit="-1" Deprecated="false"
    GenerateExtendedAccessors="false" IsIs="false" Iterable="false"
    LegalNull="true" Listen="false" Log="false" NoDoc="false"
    NoDump="false" Readable="true" Visibility="1" />
    It works fine as long as I leave out Encrypted="true" in the
    SystemPassword, but if I do this, I can find the password hanging
    around in cleartext in the /domain/userConfig/Security-folders. If I
    use Encrypted="true" it compiles fine, the server starts up fine, I
    can configure it without a problem. But as soon as I set the password
    in the admin-console and restart the server I get the following
    Exception:
    <07.06.2003 18:49:51 CEST> <Critical> <WebLogicServer> <000364>
    <Server failed during initialization.
    Exception:weblogic.management.configuration.ConfigurationException: -
    with nested exception:
    [java.lang.NullPointerException]
    java.lang.NullPointerException
    at weblogic.security.internal.SerializedSystemIni.getEncryptionService(SerializedSystemIni.java:225)
    at weblogic.management.commo.CommoModelMBean.getAttribute(CommoModelMBean.java:319)
    at javax.management.modelmbean.RequiredModelMBean.setAttribute(RequiredModelMBean.java:1681)
    at weblogic.management.commo.CommoModelMBean.setAttribute(CommoModelMBean.java:136)
    at weblogic.management.commo.CommoModelMBean.load(CommoModelMBean.java:616)
    at weblogic.management.commo.Commo.initInstances(Commo.java:241)
    at weblogic.management.commo.Commo.init(Commo.java:125)
    at weblogic.management.AdminServerAdmin.initializeCommo(AdminServerAdmin.java:477)
    at weblogic.management.AdminServerAdmin.initialize(AdminServerAdmin.java:108)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:664)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
    at weblogic.Server.main(Server.java:32)
    --------------- nested within: ------------------
    weblogic.management.configuration.ConfigurationException: - with
    nested exception:
    [java.lang.NullPointerException]
    at weblogic.management.AdminServerAdmin.initializeCommo(AdminServerAdmin.java:486)
    at weblogic.management.AdminServerAdmin.initialize(AdminServerAdmin.java:108)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:664)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
    at weblogic.Server.main(Server.java:32)
    >
    Any ideas what could be wrong? What kind of encryption service does it
    look for?
    Thanks for any idea that could be useful.
    Regards
    Thomas

    This is a known issue. Contact [email protected] for a patch.
    Satya wrote:
    This indeed looks like a bug, please enter a case with support.
    Thanks,
    -satya
    Thomas wrote:
    Hello!
    I'm trying to create a custom AuthenticationProvider for WLS7 (up to
    date with service packs) and use the
    weblogic.management.commo.WebLogicMBeanMaker to create the necessary
    stubs. The authanticator should remember the system user and its
    password, so I created the following two <MBeanAttribute>s for the
    MBeanType:
    <MBeanAttribute Name="SystemUser" Type="java.lang.String"
    Writeable="true" Default=""system"" CachingDisabled="false"
    CurrencyTimeLimit="-1" Deprecated="false"
    GenerateExtendedAccessors="false" IsIs="false" Iterable="false"
    LegalNull="true" Listen="false" Log="false" NoDoc="false"
    NoDump="false" Readable="true" Visibility="1" />
    <MBeanAttribute Name="SystemPassword" Type="java.lang.String"
    Writeable="true" Default=""password"" Encrypted="true"
    CachingDisabled="false" CurrencyTimeLimit="-1" Deprecated="false"
    GenerateExtendedAccessors="false" IsIs="false" Iterable="false"
    LegalNull="true" Listen="false" Log="false" NoDoc="false"
    NoDump="false" Readable="true" Visibility="1" />
    It works fine as long as I leave out Encrypted="true" in the
    SystemPassword, but if I do this, I can find the password hanging
    around in cleartext in the /domain/userConfig/Security-folders. If I
    use Encrypted="true" it compiles fine, the server starts up fine, I
    can configure it without a problem. But as soon as I set the password
    in the admin-console and restart the server I get the following
    Exception:
    <07.06.2003 18:49:51 CEST> <Critical> <WebLogicServer> <000364>
    <Server failed during initialization.
    Exception:weblogic.management.configuration.ConfigurationException: -
    with nested exception:
    [java.lang.NullPointerException]
    java.lang.NullPointerException
    at
    weblogic.security.internal.SerializedSystemIni.getEncryptionService(SerializedSystemIni.java:225)
    at
    weblogic.management.commo.CommoModelMBean.getAttribute(CommoModelMBean.java:319)
    at
    javax.management.modelmbean.RequiredModelMBean.setAttribute(RequiredModelMBean.java:1681)
    at
    weblogic.management.commo.CommoModelMBean.setAttribute(CommoModelMBean.java:136)
    at
    weblogic.management.commo.CommoModelMBean.load(CommoModelMBean.java:616)
    at weblogic.management.commo.Commo.initInstances(Commo.java:241)
    at weblogic.management.commo.Commo.init(Commo.java:125)
    at
    weblogic.management.AdminServerAdmin.initializeCommo(AdminServerAdmin.java:477)
    at
    weblogic.management.AdminServerAdmin.initialize(AdminServerAdmin.java:108)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:664)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
    at weblogic.Server.main(Server.java:32)
    --------------- nested within: ------------------
    weblogic.management.configuration.ConfigurationException: - with
    nested exception:
    [java.lang.NullPointerException]
    at
    weblogic.management.AdminServerAdmin.initializeCommo(AdminServerAdmin.java:486)
    at
    weblogic.management.AdminServerAdmin.initialize(AdminServerAdmin.java:108)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:664)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
    at weblogic.Server.main(Server.java:32)
    Any ideas what could be wrong? What kind of encryption service does it
    look for?
    Thanks for any idea that could be useful.
    Regards
    Thomas
    Rajesh Mirchandani
    Developer Relations Engineer
    BEA Support

  • Encrypted="true" does not encrypt MBean attribute

    Hi,
    I have developed a Custom Weblogic Security Service Provider. I have also created
    an MBean
    to manage my provider. One of my MBean attributes is as follows:
    <MBeanAttribute
    Name = "JdbcPassword"
    DisplayMessage = "The JDBC Password to the security database"
    Type = "java.lang.String"
    Writeable = "true"
    Encrypted = "true"
    Default = ""password""
    />
    I have specified Encryped="true" above, however, the value I put in the Weblogic
    Console
    is still seen in cleartext in the config.xml. Why isnt it being encrypted? Or
    do I misunderstand
    the purpose of the Encrypted attribute?
    Thanks,
    Proneel.

    "Proneel Guptan" <[email protected]> wrote:
    >
    Hi,
    I have developed a Custom Weblogic Security Service Provider. I have
    also created
    an MBean
    to manage my provider. One of my MBean attributes is as follows:
    <MBeanAttribute
    Name = "JdbcPassword"
    DisplayMessage = "The JDBC Password to the security database"
    Type = "java.lang.String"
    Writeable = "true"
    Encrypted = "true"
    Default = ""password""
    />
    I have specified Encryped="true" above, however, the value I put in the
    Weblogic
    Console
    is still seen in cleartext in the config.xml. Why isnt it being encrypted?
    Or
    do I misunderstand
    the purpose of the Encrypted attribute?
    Thanks,
    Proneel.Hi Proneel,
    Could you please tell me what version of Weblogic are you using?
    Thanks,
    Carmen

  • How can I display True/False in my dropdownlist as "Yes" and "No"?

    Hi All,
    I want to bind a dropdownlist to a boolean value (so it's either true or false).  I'm particularly interested in using two-way binding to when the user changes from "yes" to "no" the boolean value automatically changes from "true" to "false."  But, I want the user to see "yes" and "no" as the options, rather than "true" and "false".
    How can I display "yes" and "no" and still take advantage of binding?  Or can I not use binding in this circumstance?
      -Josh

    Solution 1:
    In order to display Yes/No for True/False, you may specify labelFunction for the dropdownList.
    In MXML:
    <s:DropDownList labelFunction="myLabelFunction" />
    In actionscript:
    private var arr:ArrayCollection = new ArrayCollection(["true","false"]);
                private function mylabelFunction(item:Object):String
                    if(item.toString() == "true")
                        return "yes";
                    else return "No";
    OR
    Solution2:
    may be u can try making an array collection like
    private var arr:ArrayCollection = new ArrayCollection([{label:"yes",value:"true"},{label:"no",value:"false"}]);
    and specify labelField for the dropdownList like
    <s:DropDownList labelField="label" dataProvider="{arr}" />

  • In IPhoto '08, Photos under Library, I'm no longer able to view a screen of thumbnails.   I'm only able to view a single photo at one time.  This was not true in the past.

    In IPhoto '08, in Library/Photos, I'm no longer able to view a screen of thumbnails.   I'm only able to view a single photo at one time.  This was not true in the past.

    Note the slider lower right of the iPhoto Window. Drag it left.
    Regards
    TD

  • Getting Error while posting through KB11N : No true sender object entered

    HI Expert,
    We have stastical internal order defined and same we are using in Asset. Let me explain the scenarion.
    We created the Purchase requisition with the stastical Internal Order then we did Purchase Order and MIGO -Goods Receipt.
    Now we realised that wrong Internal Order  was used. Now we want to tranasfer cost from that Internal order to New Internal Order. we are trying to post through KB11N but while giving the all details i am getting error as per below;
    No true sender object entered
    Message no. BK175
    Diagnosis
    You have entered a statistical object as a sender. Statistical objects, however, are only intended for use with dual account assignments.
    Procedure
    1. If you require a dual account assignment, enter a true object as a sender also.
    We are using cost element with having cost element category 90.
    I don't no which is the true sender Object.
    Thanks in advance
    ealry help will be highly appreciated.

    Your postings had happened to a statistical internal order.  I hope the real postings might have happened to a cost centre.
    You cannot settle anything from a statistical internal order.  It is just for information purpose only.  If the above posting had captured a cost centre (real posting), you can distribute/assess the cost from the cost centre to a real internal order for your purpose.

  • I have a MacBook Pro (15-inch, Late 2008) and am currently running Snow Leopard 10.6.8. I would like to know which is the most stable upgrade for my model. I have read some reviews of Maverick and Yosemite making the older macs slower. Is this true?

    I have a MacBook Pro (15-inch, Late 2008), Intel Core 2 Duo 2.53 GHz, 4GB Memory. and am currently running Snow Leopard 10.6.8.
    I would like to know which is the most stable upgrade for my model? Mountain Lion, Mavericks or Yosemite?
    When I had gone to the apple care centre in India a few months ago to upgrade my OSX to Mountain Lion, I was told that considering my macbook pro's specs, upgrading it would just make it less efficient, and that I should stick to Snow Leopard unless I consider buying a newer mac that would benefit from it. Is this true? I find it a bit hard to believe. Which update is most recommended?
    I also notice that my mac has gotten considerably slower. While using chrome, it buffers and struggles with even just 5 tabs open. Could this have something to do with my current ios? As a precaution, I have always been making sure I have enough free space on disk i.e around 70 - 100 free out of 250GB.
    Any advice is appreciated.
    Thanks in advance.

    Mavericks is no longer available from the App Store, so your choice is Yosemite. One option is to create a new partition (~30- 50 GB), install the new OS, and ‘test drive’ it. If you like/don’t like it it, you can then remove the partition. Do a backup before you do anything. By doing this, if you don’t like it you won't have to go though the revert process.
    Check to make sure your applications are compatible.
    Application Compatibility
    Applications Compatibility (2)

  • I was told by Borders customer service that I have to add them as a "trusted site" to avoid an error message when sttempting to use the shopping cart. Is this true, and how do I do it?

    When I go to "checkout" on Borders.com, I get an error message. The message is as follows:
    [ServletException in:/ConsumerDirectStorefrontAssetStore/ShoppingArea/ShopcartSection/body.jsp] null'
    I have tried refreshing, clearing cookies, and everything I can think of. Customer service told me it had to do with security settings, and that I had to add it to my trusted sites. I have never had to do this before, so I'm jsut wondering if this was true, and how to do it.

    Are they multi-function units? Do they include a scanner? Most people call these multi-function copiers, not printers. Printers don't have a scanner in them.
    Give us some specifics as to the brands and models you have tried.

  • Can I put a READ function in a TRUE/FALSE case structure?

    Hi,
    I have a vi that operates as controller for a mechanical system of motors.  There are several sensors of various types, that provide input to the vi, including encoders, whose period is being measured.  The attached vi is the encoder period measuring part. It measures 15 periods and tells me the average of the 15 with each loop iteration.
    In my application, the encoder period measurement is not needed unless the vi knows that ALL THE OTHER sensors in the hardware configuration are measuring values within the desired range.  For example, Sensors A, B and C should all measure between 5-10.  If they are all showing values between 5-10, then, we want the encoder value to read and display.  If only one of the sensors, say A, is measuring 12, then, we don't want the period value to READ or be subsequently processed.  So, it is easy to set up the sensors A, B, C, to give a TRUE or FALSE based on whether they are within range or not, and if all 3 are TRUE, then, that value can easily be passed to the case structure that holds my READ function for the period.  Is this a good way to do this?  The goal is to eliminate unnecessary execution time that the period READ function would consume, as well as all subsequent calculations that are performed on the period value collected.  The period data is of no use if any one of the other sensors is not in the correct range.
    If any one of the other sensors is out of range, we want to skip the encoder READ step altogether.  So, it is easy to structure a BOOLEAN in my vi as shown in the attachment.  If I do it this way, will it throw an error, or just skip the READ until the BOOLEAN is true again?  Is there a better way to prevent the READ from happening if one of my other sensor values is not within the correct range?
    Thanks,
    Dave
    Solved!
    Go to Solution.
    Attachments:
    forum JUly 18.vi ‏26 KB

    Sure, you can put a Read inside a case structure. For your application, just check that your sensors are all within range (Comparisons palette), then AND the T/F's and use the result of that for your case structure. (If you are already doing the in-range check, I can't see it here because you have 5 subVIs that I cannot open here.
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ

  • Crystal 2008: Text, Can Grow=true, Max Lines=0, truncated after 2 lines

    I have a fairly simple, grouped report with a handful of fields in each Detail section, one of which is a note/text field.  I put the text field on its own line and set Can Grow = true, max lines = 0 so that it will display what it needs to display.
    This happens to be a crystalreports.com report using data coming from Salesforce, and I can see in the source report that I have about 7 lines of text for one of my groups, but crystal is truncating it after two lines, and in the middle of a word.
    The word ('for') doesn't have any obvious special characters in it, so I'm guessing that there's some sort of character limit that I'm bumping up against.
    I have another record that is returning more than two lines, though; are there particular characters that could cause this?  I can scrub the data and/or put Salesforce Validation Rules in place to try and prevent them from getting in.
    Any suggestions would be appreciated.
    Duncan

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • Why did I get an email from the fraud dept saying my order is on hold, told to call a number, and then told by dept it's not true?

    I placed an order to upgrade my phone yesterday, and the order went through, I was told the new phone would arrive Thursday. After I got home from work today I saw an email from Verizon that says "Dear Customer:
    Verizon Fraud Prevention Team is currently reviewing the following order on your wireless account. Please call the Verizon Fraud Prevention Team at 888-483-7200 option 3, press 1 to verify this Order."
    I called this number immediately, since I need this phone ASAP, assuming it would just be a recording and I would have to verify an account number or something. But instead, after following the instructions, I was put on hold because I needed to speak to someone in person. After several instances of my call being cut off after being on hold for at least half an hour, I finally got through after three hours and was able to speak to a fraud representative. I gave her my info and told her the problem and she told me I had called the wrong department. Instead of the fraud department, I needed the online order department. She transferred me, and I waited on hold again. When the representative from the online order dept picked up, she first told me if it was a fraud issue I'd need to speak with the fraud dept - who had JUST transferred me to her. After this, she said that my order is not on hold, because it hasn't even been processed yet or had the credit check done. When I asked if this meant I hadn't needed to call at all, she said yes. Is this actually true or is there a chance that there's an issue with my order I don't know about? If there is no issue, these emails really shouldn't be sent out, they're incredibly misleading, and I've wasted a whole lot of time and experienced an incredible amount of anxiety for no reason.

    Hi.  I checked on the order and it says the order is currently being processed and I should check back tomorrow. I'm mostly just concerned because I got an email saying the order was on hold, and I want to make sure it actually does go through and I'm not just waiting for a delivery that's not going to come. I'm still confused as to why I'd get an email saying I had to call the fraud department only to be told I shouldn't have called the fraud department.

  • I cannot find a Google Toolbar add-on that is compatible with Firefox 7.0.1. Is it true that there isn't one?

    My Dell Inspiron 1464 laptop crashed recently and Dell replaced the hard drive and re-installed Win 7 Home Premium, 64 bit. I bought the laptop in 2009 and soon experienced a lot of compatibility problems between the computer and peripherals, like printers, and in some Web applications. I did some Web research and it seemed that the problems were related to the Win 7 64 bit OS. I talked to Dell and they acknowledged that my problems might be due to that 64 bit version. They sent me the 32 bit installation disc to replace the OEM 64 bit version and I downgraded the OS on my Dell. This seemed to solve my problems, so I have been using that until the computer crashed on 30 Sept. this year.
    After it crashed, I contacted Dell and we walked through a number of diagnostic tests and, although we couldn't find anything obviously wrong with the HDD, it just wouldn't load Win 7 and wouldn't boot. Dell concluded that the HDD was well and truly buggered somehow.
    They sent me a box and I sent the laptop to them for repair.
    Dell replaced the HDD and re-installed the 64 bit Win version at my request, since I had been advised by my IT guys at work that more things were now compatible with the 64 bit version than when I bought it in 2009. In addition, I had purchased a newer printer and other external bits in the past year and expected that I wouldn't have the compatibility issues now. With the full original version, I would be able to use more of my computer's resources.
    Before I sent the computer back to Dell for repair, I took it to Staples and had the Tech Support guys there transfer the data from the wonky hard drive to an external drive, which they did successfully. In fact, I did this on advice from one of the Dell tech support techs with whom I spoke.
    I got the computer back from Dell this last week and re-downloaded Firefox, which is my preferred browser, but I can't seem to add the Google Toolbar to it, now. I have the Google toolbar on Internet Explorer and have used it in earlier versions of Firefox, especially the "translate" function, since I do considerable research in documents in many languages. When I tried to download the Google Toolbar and add it to my new Firefox installation, it says I can't. When I do an Internet search I find many posts saying that Google Toolbar does not work with any Firefox of versions 5 or higher. Is this true? If not, how can I add Google Toolbar to my Firefox 7.0.
    Thank you.
    Mark Fritzler

    You can turn off compatibility checking, but more and more of the Google Toolbar will not work. Google is no longer supporting the Google Toolbar so you should use the alternatives.
    Hi Mark,
    See http://kb.mozillazine.org/Using_Google_Toolbar_features_without_toolbars
    If you have an aspect that is not covered, indicate what that is; otherwise, expect you to be fully functional within 1-2 weeks.
    <br><small>Please mark "Solved" one answer that will best help others with a similar problem -- hope this was it.</small>

  • Dialogue tick boxes un-hiding all fields, not just the ones where value has changed to true

    I am hoping someone can help me make what I want to happen, happen if certain check boxes are ticked withing the dialogue box
    right now I can see on the console print that the tick box turns the value from false to true but the OK button is also un-hiding all my fields rather than just the ones where the value has turned to true. What am I missing here
    //Create a Dialogue box for staff to state how many of the account owners are in branch in order for the names to show in the signing section
    var Signors =
        result:"cancel",
        DoDialog: function(){return app.execDialog(this);},
        bChk2:false,
        bChk3:false,
        bChk4:false,
        bChk5:false,
        initialize: function(dialog)
            var dlgInit =
                    "Chk2": this.bChk2,
                    "Chk3": this.bChk3,
                    "Chk4": this.bChk4,
            dialog.load(dlgInit);
        commit: function(dialog)
            var oRslt = dialog.store();
            this.bChk2 = oRslt["Chk2"];
            this.bChk3 = oRslt["Chk3"];
            this.bChk4 = oRslt["Chk4"];
        description:
            name: "Signors",
            elements:
                    type: "view",
                    elements:
                            type: "view",
                            char_height: 10,
                            elements:
                                    type: "static_text",
                                    item_id: "stat",
                                    name: "Who is here to sign:",
                                    char_width: 15,
                                    alignment: "align_fill",
                                    font: "dialog",
                                    type: "view",
                                    char_width: 8,
                                    char_height: 8,
                                    align_children: "align_top",
                                    elements:
                                            type: "view",
                                            char_width: 8,
                                            char_height: 8,
                                            elements:
                                                    type: "check_box",
                                                    item_id: "Chk2",
                                                    name: "Primary Applicant",
                                                    type: "check_box",
                                                    item_id: "Chk3",
                                                    name: "Associate 1",
                                                    type: "check_box",
                                                    item_id: "Chk4",
                                                    name: "Associate 2",
                            type: "ok_cancel",
    // did the value change when ticked - lets check
    Signors.bChk2 = false;
    Signors.bChk3 = false;
    Signors.bChk4 = false;
    if("ok" == Signors.DoDialog())
        if (Signors.bChk2 = true)
    getField("Signor1").hidden = false;
    getField("Staff1").hidden = false;
    getField("Date1").hidden = false;
    getField("Date2").hidden = false;
    if (Signors.bChk3 = true)
    getField("Signor2").hidden = false;
    getField("Staff2").hidden = false;
    getField("Date3").hidden = false;
    getField("Date4").hidden = false;
    if (Signors.bChk4 = true)
    getField("Signor3").hidden = false;
    getField("Staff3").hidden = false;
    getField("Date5").hidden = false;
    getField("Date6").hidden = false;
        console.println("Chk2:" + Signors.bChk2);
        console.println("Chk3:" + Signors.bChk3);
        console.println("Chk4:" + Signors.bChk4);
        console.println("Chk5:" + Signors.bChk5);
    //console.println shows if bChk.. is true or false
        console.println("Chk2:" + Signors.bChk2);
        console.println("Chk3:" + Signors.bChk3);
        console.println("Chk4:" + Signors.bChk4);
        console.println("Chk5:" + Signors.bChk5);
    //Yeah, confirmed values have changed, now show fields based on staff input
    //was primary applicant ticked
    doWhatIWant: function(results) {
    if (results [Signors.bChk2] = true)
    getField("Signor1").hidden = false;
    getField("Staff1").hidden = false;
    getField("Date1").hidden = false;
    getField("Date2").hidden = false;
    //was Associate 1 ticked
    if (results [Signors.bChk3] = true)
    getField("Signor2").hidden = false;
    getField("Staff2").hidden = false;
    getField("Date3").hidden = false;
    getField("Date4").hidden = false;
    //was Associate 2 ticked
    if (Signors.bChk4 = true)
    getField("Signor3").hidden = false;
    if (Signors.bChk4 = true)  
    ("Staff3").hidden = false;
    if (Signors.bChk4 = true)
    ("Date5").hidden = false;
    if (Signors.bChk4 = true)
    ("Date6").hidden = false;

    You're missing some curly brackets, using the incorrect equality operator, and using the long deprecated field.hidden property. Try this:
    if ("ok" == Signors.DoDialog()) {
        if (Signors.bChk2) {
            getField("Signor1").display = display.visible;
            getField("Staff1").display = display.visible;
            getField("Date1").display = display.visible;
            getField("Date2").display = display.visible;
        if (Signors.bChk3) {
            getField("Signor2").display = display.visible;
            getField("Staff2").display = display.visible;
            getField("Date3").display = display.visible;
            getField("Date4").display = display.visible;
        if (Signors.bChk4) {
            getField("Signor3").display = display.visible;
            getField("Staff3").display = display.visible;
            getField("Date5").display = display.visible;
            getField("Date6").display = display.visible;
        console.println("Chk2:" + Signors.bChk2);
        console.println("Chk3:" + Signors.bChk3);
        console.println("Chk4:" + Signors.bChk4);
        console.println("Chk5:" + Signors.bChk5);
    I don't know if that will deal with all of the problems, but it's a good start.

  • Multiple actions on If statement true value

    I want to do several things when in If statement is true, but cannot seem to do it without writing multiple If statements.   For Example, if Collection1 only has 1 row of data, I want to clear Collection2 and update the MyVal context to true.
    I currently use:
    If(CountRows(Collection1) =1 1, Clear(Collection2));
    If(CountRows(Collection1) =1 1, UpdateContext({MyVal: true}))
    but would like to be able to put both actions in a single true statement.   Is this possible?
    Thanks!
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This is beneficial to other community members reading the thread.
    -Bruton

    While I thought I was trying that, apparently my keyboard is a bit "chatty".  Some times when I type 1 it types 1 1. this was obviously messing up anything I write, but I didn't notice it.
    If(CountRows(Collection1) =1 , Clear(Collection2);UpdateContext({MyVal: true}))
    Works, but I apparently had
    If(CountRows(Collection1) =1 1, Clear(Collection2);UpdateContext({MyVal: true}))
    Thanks!
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This is beneficial to other community members reading the thread.
    -Bruton

  • IF statement is true THEN replace with 0 in box with formula

    Hello.
    Sorry maybe for very stupid question, but I have some kind of little problem.
    I need to do this:
    If the checkbox (B16) is TRUE (checked) then simply put 0 to field O16. How I can do it, if I already in this field have a formula?
    Best reagards,
    And thanks for help!

    Hi Aviation,
    I may be wrong, but this is how I see a simplified version of your question.
    Formula in D2 (and Menu > Insert > Fill > Fill Down) is
    =IF(A2=TRUE,0,MAX(C2-B2,0))
    In my Region, I use a comma "," in formulas. If you use a semi-colon ";" the formula is
    =IF(A2=TRUE;0;MAX(C2-B2;0))
    Happy Flying!
    Ian.
    P.S. or replace TRUE with FALSE in the formula (thank you Badunit).
    Message was edited by: Yellowbox. P.S. or replace TRUE with FALSE in the formula (thank you Badunit).

  • Using an IF Statement in Numbers on Entire Column for Each Value that is True

    Hi,
    I am trying to create a formula to help calculate a chart chart.
    I need to gather the SUM of Column A for Each instance that Column B of the same row is =TRUE. I need to do it in the most general way possible as this formula will be gathering information from multiple tables and creating a sum.
    For Instance:
    TABLE 1
    Column A
    Column B
    5
    True
    3
    False
    4
    True
    1
    False
    TABLE 2
    Column A
    Column B
    5
    True
    3
    False
    4
    True
    1
    False
    The result I am looking for would be 18.
    Thanks for any input.

    JE,
    Here's an expression that you could use:
    =SUM(SUMIF(Table 1 :: B:B, TRUE, Table 1 :: A:A), SUMIF(Table 2 :: B:B, TRUE, Table 2 :: A:A), and so forth for additional tables)
    Jerry

Maybe you are looking for

  • HT1177 how to restore itunes library?

    after reinstalling computer's system i can not restore the itunes library. in the capsule i can find specific song or album but dont find the way to the library. any body?

  • "Publish Now" to 3rd party web hosts?

    Is it possible to publish directly from iWeb to a 3rd party webhost? MobileMe is blocked in China, so that is ruled out, and I already have a web host. iWeb has all the tools I need to create the site I want. But I don't want to upload everything man

  • Groupwise 14.0.1 build 117118 blows up with Microsoft C

    I start navigating around opening attachments in the client and it blows up.. On a windows xp pc..

  • Not showing Finder Window / Contact Taps in Yosemite

    Retina Macbook Pro (13 inch) installed OS X Yosemite. When opening the Finder Window no content been shown. Same with the Contact App not contact windows been shown. How to solve the Bug? All is OK on the other (Desc Top) computers. - Cheers, Georg

  • New Macbook pro suddently can not watch any online video or movie

    I just bought a new 13" Macbook pro 4 days ago, the first day everything work well (include watching online movie or video), yesterday, I suddenly found I can not watch online movie or video anymore, the symptom is: I can open any website with online