2 Replies Latest reply on Dec 4, 2015 2:06 PM by marcopel

    if  "yes", DO, If "no" do nothing

    marcopel

      Dear community, my name is Marco

      Im 2 weeks new to Filemaker and I'm using it to keep track of plants in a greenhouse.

      Here is the question:

      I basically have 2 tables : Seed and Plant.

       

      In my head the process would work like this:

      From the seed table I use different fields to create a field called Seed label

      When I copy this label on the assign field in a new record in the Plant table it generates a Plant label

       

      If I copy the plant label in a specific field back the Seed table it generate a new seed record with its seed label.

       

      And here is the point:

      I made a simple calculation field (let's call it A ) that should not change if the Plant Label field is empty and do something if it is not empty

      In order to do that I specified that if the Plant label field is empty then the calculation field will be replace with itself (so no changes)

       

      Case (

      IsEmpty ( Plant label ) = 1; A  #replacing itself ;

      IsEmpty ( Plant label ) = 0; DO something

      )

       

      The result is strange, field A has a lot's of records that look like :

      ES100

      ES300

      ES345

       

      If Plant Label is empty it should remain the same , instead the first 2 character "ES" are removed leaving only the number..I don't understand why.

      Can someone help me with that.

       

      I ask you sorry also for any misused of terminology and I hope I was clear enough.

       

      thanks a lot in advance.

       

      Marco

        • 1. Re: if  "yes", DO, If "no" do nothing
          coherentkris

          Case (

          IsEmpty ( Plant label ) = 1; A  #replacing itself ;

          IsEmpty ( Plant label ) = 0; DO something

          )

           

          Is the same as

          Case (

          IsEmpty ( Plant label ); A  #replacing itself ;

          DO something

          )

           

          What you say you need is something like

           

          Case (

          not IsEmpty ( Plant label ); Do something to field A ;

          DO nothing to field A

          )

           

          Where the "ES" text is coming from is not evident in your description.

          You should post the file so we can have a look at exactly what is happening

          1 of 1 people found this helpful
          • 2. Re: if  "yes", DO, If "no" do nothing
            marcopel

            HI, thanks for the answer, I'm still try to figure out how to upload files, helpful for the future.

            In the meantime I think I solved the problem. you see ES was just part of the record name of field A

            when Plant label was empty then Filed A should have remain the same, instead the ES character were removed:

             

            this was what I was expecting:

             

            Field A               Plant label

            ES500

            ES101

            Do something      Not empty

             

            Instead was turing into:

             

            Field A               Plant label

            500

            101

            Do something      Not empty

             

            I removed the automatic indexing and set the "result of the calculation"  as text from the Field A and it works now.

            Guess that was the problem..

             

            Thanks a lot for your reply, I appreciated

             

            M.