8 Replies Latest reply on Aug 26, 2011 2:05 PM by DanDow

    One field = another doesn't work.

    DanDow

      Title

      One field = another doesn't work.

      Post

      Hello,

      My workflow is that I import a tab delimited text file and I have a calculation field that is simply:

      Company_Description = Set_up #

      Set_up # is from the outside TDT import and I just want my Company_Description field to parrot it but nothing shows up in the Company_Description field even though there is a text value in the Set_up # field after import.  There are other fields in the document that do work, however.  For example, the document has a Description field.  This calculation...

      Company_description = Description

      ...works.  Can anybody help?  Is there any reason a calculation field set to have a text output might not work with a text field?  Could this be a relationship problem?  I'm stumped as to why I canot get this one field to copy into my field but I can get others to do it from the same document.

      Thanks! Smile

        • 1. Re: One field = another doesn't work.
          philmodjunk

          I don't see how:

          Company_description = Description

          Can return any value but 1 (True, the values are the same ) or 0 (False, the values are not the same)

          Are these fields defined in the same table or are you attempting to describe a relationships between two tables where the records match on these fields?

          I don't see why you would want one field to "parrot" another. Wouldn't it be simpler just to use one field for all cases where you need to see this value?

          To set up a calculation where one field simply returns the value of anothe field, the calculated expression would simply list the name (and possibly the tableoccurrence name) of the other field:

          In the case of your first field, that would make the expression: Set_up #

          • 2. Re: One field = another doesn't work.
            DanDow

            Hello,

             

            Thank, for your answer.  The reason I want the one filed to parrot the other is that the next step in the workflow is to spit out an XML file to upload to a database and the database is looking for a specific value expressed in the XML field "Company Database."

            In ny case, the calculation field "Company_Description" is set to = Set_up # and is set to return a text value so it should just copy the text like it does if I set Company_description = Description.  They are defined in the same table.  Set_up # (and Description) are imported values from the Tab file and Company_Description is a field I defined as = Sert_up #.

            • 3. Re: One field = another doesn't work.
              philmodjunk

              Are these fields of type calculation or text fields with auto-entered calculations?

              Company_description = Description

              Is a boolean expression that compares the value in Company_Description with the value in Description returning true if they match and false if they do not. The only possible values it can return are 1, 0 and Null (Null can be returned if both fields are empty.)

              Please try the following and you'll get the value you want.

              define the field as a field of type calculation.

              Enter the field name: Set_up # as the sole item in its calculation.

              Select text from the return type drop down.

              • 4. Re: One field = another doesn't work.
                DanDow

                Hello,

                Sorry if I was not clear, but that's actually what I'm doing.  Company_Description is a calculation field with the sole entry being "Set_up #" that is set to return a text value.  This returns nothing.  When I set Company_Description as a calculation field with sole entry "DESCRIPTION" - another field in the same imported Tab file - that calculation does return the text in the DESCRIPTION field.  To summary:

                I import the tab file and if:

                Company_Description = "DESCRIPTION" it will return: yada yada yada

                 

                I Import the tab file and if:

                Company_Description = "Set_Up # " it will return nothing.

                 

                Bothe DESCRIPTION and Set_Up # are text fields are there are text strings in every instance in the fields.

                • 5. Re: One field = another doesn't work.
                  philmodjunk

                  OK, I don't see why this doesn't work either. I think I'd need to see the file before I could suggest anything more. If you choose to, you can upload an empty copy of your file to a file share site and post the download link here.

                  • 6. Re: One field = another doesn't work.
                    DanDow

                    Uhg.  Thanks for your help but the docs are proprietary documents that belong to a client.  I was hoping someone had run into something similar.

                    • 7. Re: One field = another doesn't work.
                      philmodjunk

                      Usually, it is the data in the file that is proprietary, not the database design. You can always upload an empty copy, a clone as we call it to protect sensitive data.

                      In any case, sense something that appears obvious and simple isn't working, you might try running a recover on the file to see if the file might be damaged or have an index that might need to be rebuilt. Test the recovered copy even if no problems are reported as the recovered copy will have rebuilt field indexes.

                      Things to keep in mind about Recover:

                      1. Recover does not detect all problems
                      2. Recover doesn't always fix all problems correctly
                      3. Best Practice is to never put a recovered copy back into regular use or development. Instead, replace the damaged file with an undamaged back up copy if this is at all possible. You may have to save a clone of the back up copy and import all data from your recovered copy to get a working copy with the most up to date information possible.
                      • 8. Re: One field = another doesn't work.
                        DanDow

                        Hello Thanks again for your help.  That didn't work but it made me think and I found a work around.  If I turn the teb file into an FMP file first, then import from there it works the way it's supposed to.

                         

                        Thanks again!