Gismo12 Posted November 2, 2018 Posted November 2, 2018 (edited) Hi All, I need to copy one field only from one layout (+- 200 records) and past all those records from that field into another layout. I have tried a few commands but does not produce the required result. Please could you advise on a script? Edited November 2, 2018 by Lee Smith Change title spelling error
comment Posted November 2, 2018 Posted November 2, 2018 I don't understand your question. You have 200+ records in one table (?) and you want to duplicate their values in another table (?) ? Where you also have the same amount of records? Or do you mean copy all 200+ values into a field of a single record in the other table? Why would you ever need to do such things? Please provide some more background, as this looks like an XY problem.
Gismo12 Posted November 2, 2018 Author Posted November 2, 2018 I need to copy all records in the first table (Product) , but only a specific field (Part Number) to a second table (Catalog) to field Product Number) if table 1 has 200 records, table 2 should have 200 records
comment Posted November 2, 2018 Posted November 2, 2018 Technically, you could import them - but I would still ask why you think it's necessary. As a rule, we try to eliminate duplicate data.
Gismo12 Posted November 2, 2018 Author Posted November 2, 2018 The First table is my products table with pricing, which is imported from an excel file, pricing is always changing in my catalog table i need to link a picture of the product thus the reason why i need to duplicate. i dont have pictures in the excel format to import every time there is a price change
comment Posted November 2, 2018 Posted November 2, 2018 8 minutes ago, Gismo12 said: pricing is always changing Does the list of products also change (significantly) every time? If not, you should look into importing the prices using the update matching records method. That way you could have a single table with all your Product info, including images and current prices. 1
Gismo12 Posted November 2, 2018 Author Posted November 2, 2018 no the product list does not change that often i will look into that, thank you
comment Posted November 2, 2018 Posted November 2, 2018 Note also that even with two tables, the Catalog table can access the current prices via a relationship based on matching a known identifier, such as SKU - so there is no need to move data from one location to another.
Gismo12 Posted November 2, 2018 Author Posted November 2, 2018 Yes, as you explained in the last comment, that was my reasoning behind copying the data to the second table to add a picture to the second table.
comment Posted November 2, 2018 Posted November 2, 2018 If the second table (Catalog?) has no records yet, and you want to populate it with the products you currently have, then importing them is the simplest way. Filemaker allows importing records from one table to another in the same file (make sure the source table has a found set of all records you wish to import). But this would be a one-time operation and there would be no need to script it.
Gismo12 Posted November 2, 2018 Author Posted November 2, 2018 how would i import from one table to another, one field only, without a script?
comment Posted November 2, 2018 Posted November 2, 2018 (edited) 22 minutes ago, Gismo12 said: how would i import from one table to another, one field only, without a script? Go to a layout of the source table and select Show All Records from the Records menu (or do a find to locate only the records you want to import); Go to a layout of the target table and select Import Records > File… from the File menu. Choose the current file as the source file. In the Import File Mapping window, select the source table from the drop down menu on the left pane and map the source field to the target field on the right. For more detailed instructions, see the help at: https://fmhelp.filemaker.com/help/17/fmp/en/#page/FMP_Help%2Fimport-action-field-mapping.html%23ww1061356 -- Make sure to have a backup in case you make a mistake. Edited November 2, 2018 by comment 1
Gismo12 Posted November 5, 2018 Author Posted November 5, 2018 Hi, I have managed to import the data successfully by I noticed that when you create a new record, the auto index key is updated but then you import, the auto primary key is not updated. which means when I click to add the photo of the product after the data has been imported, I get a primary key is defined to require a value, how would I go about this?
comment Posted November 5, 2018 Posted November 5, 2018 10 hours ago, Gismo12 said: the auto index key is updated but then you import, the auto primary key is not updated I am not sure what the difference between the two is. If you select Perform auto-enter options while importing in the Import Options dialog box, then all auto-enter fields will be populated.
Recommended Posts
This topic is 2278 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now