4 Replies Latest reply on Dec 27, 2010 8:55 AM by kingsley47

    Simple Is Empty Question



      Simple Is Empty Question


      I am trying to use the isempty function to put certain text into a field based on whether another field is empty or not. I have written the calculation below.

      Case ( IsEmpty ( Heat Treatment 2::Aust. Temp. );
      "Tempered at";
      "Austenitized at" )

      If the Heat Treatment 2::Aust. Temp. field is empty then I want the calculation field to say "Tempered at" and if it is not empty then I want it to say "Austenitized at". But whether the Heat Treatment 2::Aust. Temp. field is empty or not, the calculation field always say "Tempered at".

      Could someone please tell me what is wrong with my calculation? I have compared it to other examples online and I cannot find a difference.

      Thank you in advance.

        • 1. Re: Simple Is Empty Question


          your calculation works ONLY and ALWAYS evaluating the first related record so, if the first related record isn't empty, the returned result is right.

          • 2. Re: Simple Is Empty Question

            If the first related record is not empty, I want it to say "Austenitized at" but it keeps saying "Tempered at". The corresponding field in the first related record is not empty in this case.

            Did I write the calculation backwards?

            • 3. Re: Simple Is Empty Question

              The case statement's syntax appears correct. If you place a unsorted portal to Heat Treatment 2 on your layout (just as a way to check things), do you see the record you expect in the first row of your portal?

              As Raybaudi has indicated, this calculation will ignore all but the first related record. So you may need to doublecheck that your relationship is matching to the records you expect.

              • 4. Re: Simple Is Empty Question

                Wow, I'm glad you asked me to do that because the issue appears to be completely different from what I thought it was. When I open up an unsorted portal, nothing actually comes up. I checked in the reltionship table and everything looks good. I have one field that contains one non-duplicated code of the same value connected in both databases.

                So then I tried to just make a field that contained a lookup value from the heat treatment 2 database. When I typed in the corresponding code into my original database the lookup also did not work...............

                As I was typing this I found the issue....I had made my relationship between databases by adding a database non-remotely. I redid everything, added the heat treatment 2 database remotely and this all worked fine.

                Thanks so much for your help.