empty field is not considered empty - InfoPath Dev
in

InfoPath Dev

empty field is not considered empty

Last post 07-31-2014 09:11 AM by AmsterdamSchool. 12 replies.
Page 1 of 1 (13 items)
Sort Posts: Previous Next
  • 07-24-2014 09:33 AM

    empty field is not considered empty

     In my form if a specific field is left empty, some action needs to be taken by another user. I use a simple test like so:  FieldA != "" as suggested in this thread http://www.infopathdev.com/forums/p/28619/98451.aspx . Sure enough if I enter data into it, FieldA is no longer considered empty. However, if I then delete this data (assume the user entered the data into this field by mistake and then removes it) then the status remains not empty.

    How can I solve this? The check is set to recalculate if the value changes.

    Thanks for your help.

  • 07-24-2014 09:38 AM In reply to

    Re: empty field is not considered empty

    After you delete the data, you are tabbing (or clicking) out of the field?

    Hilary Stoupa

  • 07-24-2014 12:02 PM In reply to

    Re: empty field is not considered empty

    I'm clicking out of the field. I can see how that could potentially have a different effect, but unfortunately there is no way to tell what the user might do, or is there? Thank you
  • 07-24-2014 12:53 PM In reply to

    Re: empty field is not considered empty

    I just know that IP won't consider the field to be changed until after you click or tab out of it - that's why I asked - I was wondering if the formula / validation / whatever hadn't recalculated yet.

    Hilary Stoupa

  • 07-25-2014 07:57 AM In reply to

    Re: empty field is not considered empty

    After I entered the data I did indeed need to click in another field to trigger the calculation to change to 'not empty'. After completely clearing the field I again clicked in another field, which must have triggered the calculation in the same way as it did before. However / where ever I click, the status remains 'not empty'. Very strange... Do you have any ideas what might cause this?
  • 07-25-2014 08:07 AM In reply to

    Re: empty field is not considered empty

    That is strange. Feel free to attach your form under the Options tab in a reply if you'd like me to take a look.

    Hilary Stoupa

  • 07-31-2014 09:10 AM In reply to

    Re: empty field is not considered empty

    Thank you Hilary. Other projects came up so it took me some time to react. I created a simple example tot demonstrate the issue, but I couldn't replicate the problem. In this simple example it just works as expected. It looks like this might be a bug because in my original 'real' form, the exact same check for emptiness doesn't work (the check field changes to true when data is entered in the field it monitors, but it doesn't get changed back to false when the data is removed). Unfortunately there is not point in sending you the original form because it is linked to various data sources which you can't access. So it looks like I have to accept it will not work. Some how the complexity of the original form interferes with the update proces. Thanks for your help anyway.
  • 07-31-2014 09:11 AM In reply to

    Re: empty field is not considered empty

    PS Sorry about the absence of line breaks in my message. Google chrome somehow removes them
  • 07-31-2014 09:16 AM In reply to

    Re: empty field is not considered empty

    You might want to right click the "problem" field in the data source task pane (where the fields show) and select Rule Inspector - see if something else may be setting that field to .... something. :)

    Hilary Stoupa

  • 08-04-2014 05:55 AM In reply to

    Re: empty field is not considered empty

    My first reaction to that suggestion was: of course not... if there is a rule I'd know about it.... but sure enough something that I had tested/tried weeks ago was still there and interfered with my 'empty test'. So problem solved :-) Thank you Hillary
  • 08-04-2014 11:50 AM In reply to

    Re: empty field is not considered empty

    Hah! Glad the mystery is resolved!

    Hilary Stoupa

  • 08-05-2014 06:24 AM In reply to

    Re: empty field is not considered empty

    A new mystery popped up... I'm still getting some strange behavior after removing the rules that interfered previously. My formula: A = "true" and B = "true" and (x != "" or y != "" or z != ""). I assume that as long A and B are true, only one of the fields x,y or z has to be not empty for the function to produce a 'true'. This works as expected. However, if x and y both have content, and I clear one of the two, the the function produces a false. If I then toggle A (a check box) to false and then back to true again, then the formula results in true again, as expected. I don't understand why this toggling is required. This time there are no rules that can interfere. Is there something wrong with the formula? Maybe the parentheses don't quite work as I think the do in Xpath fomulas? Thank you.
  • 08-05-2014 06:58 AM In reply to

    Re: empty field is not considered empty

    Please ignore previous post. It is solved. Because of language issues (I work in a Dutch version of InfoPath) I couldn't get the test for A = "true" working. No matter what translation and spelling of "true" I used, it never worked. I first 'solved'' this by using the true() (in Dutch: Waar()) function. I now understand that this actually *is* a function and not a value. It turns out that when testing if a boolean is true or not, the value to test for is the untranslated "true". Very strange, because everything else is translated. Creating these translated versions of software is a nightmare. In Excel all the formulas are in Dutch , but macros are in English. Any code or tips that you find online you first need to translate into Dutch before the program can use them. Unfortunately our company (school) uses a Dutch version of Office. Rather than making live easier for foreign speakers, it just adds extra difficulty, especially in case like this where 99% of the functionality is translated, but without warning a few things aren't. So...there is that frustration of my chest ;-)
Page 1 of 1 (13 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.