6 Replies Latest reply on Sep 25, 2015 10:01 AM by dtcgnet

    How to copy data in a field and replace it with itself.

    tdeppen

      I would like to add this calculation (what ever it might be) to the end of a long import script. I have an indexed form number pulling in a bunch of info, but that information if being trumped by the imported data in the script. I figure that if I can copy and paste the form number at the end of the script it will bring in the indexed information replacing the imported data. We have been manually editing the form number after the import, to bring back the indexed information (which is a huge pain). I think my problem is that the form number is linked up in the import (cvs file) before the rest of the unwanted importing info. which I can't seem to change.

        • 1. Re: How to copy data in a field and replace it with itself.
          coherentkris

          The answer is dependent on knowledge of what is imported, how the import is arranged within FM import dialog and the data structure of the table into which the data is imported.

          Without details we would be guessing.

           

          When you say data is getting "trumped" on import it suggests you might want to research the import functionality with the goal of understanding exactly what occurs during an import in all of the possible cases that present themselves in the Import dialog selections.

          • 2. Re: How to copy data in a field and replace it with itself.
            siplus

            tdeppen wrote:

             

            I would like to add this calculation (what ever it might be) to the end of a long import script.

             

            Investigate the Replace function. After an import your found set = the imported data, so you can set a field in every record belonging to imported data records to whatever you want, using Replace.

            • 3. Re: How to copy data in a field and replace it with itself.
              tdeppen

              The import is bringing in multiple types of orders (cvs file all with the same headers). The script is heavily based upon the information which is imported, followed by a couple of calculations based from the imported data. Some orders will have a referenced form number (not all of them). That form number is indexed to a forms data base brining in details of the form such as paper, inks, folding, drilling, etc.. currently that indexed form data is overwritten with the information being imported from the cvs file. I would like to have the forms data to show instead of the imported data. The form number is linked towards the beginning of script and the import order which I can't change in the cvs file (see attached file)FM.jpg. Our current fix is to manually edit/update the form number after the import to reset the form info. back to the data which is in the forms data base. I would like to add the edit/update of the form number as the last calculation of the script, reseting some of the information with orders containing a form number. I hope that is helpful.

              • 4. Re: How to copy data in a field and replace it with itself.
                coherentkris

                If it was my problem to solve I would start by importing the csv into a temp table and programmatically massage and move the data to where it needs to go.

                i don't like trying to do it all in one step on a potentially "live to the users" table but thats just me.

                • 5. Re: How to copy data in a field and replace it with itself.
                  tdeppen

                  The import process works great and I am able to currently import all my orders in one click of a button....other than the form info. "over lapping" the indexed information. So my original question....is there a way to copy text in a field and replace it with itself? I believe that will solve my only issue with this import. We have been using this for a while, and it works great, so much faster and more accurate than typesetting all the orders by hand.

                  • 6. Re: How to copy data in a field and replace it with itself.
                    dtcgnet

                    There's a lot going on here. One thing I'd do for sure is to rename your table called Repro 07-08. The use of the "-" wreaks havoc on calculations. Rename it Repro07_08 or something like that. Take a look at your script. FileMaker was smart enough to modify all of your references to the table by adding "$" and brackets any time you reference a field in your calculations. Renaming the table in Manage Database will fix all of those references and save you headaches in a lot of other ways. Avoid using characters and items in the following screenshot:

                     

                    Name Characters.tiff

                    This won't help with your problem because more information is needed, but it's good practice and will save you headaches.