3 Replies Latest reply: May 15, 2014 9:56 AM by baghu _ RSS

    Combine/Compare two fields

    baghu _

      Hello,

       

      I'm using Monarch pro 8 and i've the following issue.

       

      I need to combine two or more fields and needs to create a new value in the third field.

       

      Example:

       

      I've two fiels for sex, one for male list and another one is for female list. I need to compare these two fields and need to create a third field as Sex and should take the value from either one of these columns.

       

      This is basically to reduce the number of columns from the data base by combining and comparing many fields like this.

       

      Any suggestions could be appreciated.

       

      If you need more information, I would be happy to give that.

       

      Thanks and Regards

      Baghavathy

       

      [size="1"][ October 10, 2006, 02:04 PM: Message edited by: baghu ][/size]

        • Combine/Compare two fields
          Grant Perkins

          Hi Baghu,

           

          It sounds like your third field should be a calculated field using the IF() function in some way.

           

          I will take a guess that in your two field example only one of the fields is populated  - sex will be either male or female. So a calculated field might be something like this:

           

          IF(MALE_FIELD<> " ", "M","F")

           

           

          However you may need to cover for the possibility that the FEMALE sourced field is also blank OR populated which makes things  a little more interesting and would require a nested IF()formula or a series of IF() comparisons.

           

          I hpoe this helps. Please let us know if the data presents the need for a more complex solution.

           

           

          Grant

          • Combine/Compare two fields
            baghu _

            Dear Grant,

             

            Thank you very much for the quick response.

             

            I've tried this logic and it is working fine when I compare only two fields. As I mentioned in my earlier mail, I actually needs to compare with two or more fields. In one such instance, I need to compare 8 different fields.

             

            Please give me more insights on using the NESTED loop or any other logics.

             

            Thanks and Regards

            Baghavathy

            • Combine/Compare two fields
              baghu _

              Dear Grant,

               

              I've used your other reply for NESTEDIF and it did solved my issue.

               

              Thank you very much for your wonderful support.

               

              Regards

              Baghavathy