Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Copy New Records in an Unrelated Table?


jeolmeun

Recommended Posts

How can I copy new records in an unrelated table?

 

I have an amount of records in one table, and would like to create new records for each in the unrelated table. I would like to combine fields from the first table to the unrelated table.

 

Is there a way to get the value of a field from another unrelated table?

 

confused.gif

Link to comment
Share on other sites

Isolate the records you want to duplicate in the unrelated table (so that only the records you want to copy are in the found set). Or, if you want to copy all records, be sure you issue a "Show All Records" first (or leave the file closed; in which case all records will automatically be selected for import). Then switch to a layout based upon the table you wish to hold the new records. Perform an Import. When the Import dialog opens, be sure to select the Source table (your first unrelated table) in the top left popup.

 

Map the records (left pane your unrelated table; right pane your current table). At the bottom left, select "Add New Records". This will import every record in your original found set into your current table.

 

Is this what you wish? If not, explain more and we'll help you further.

 

PeteTheBeat

Link to comment
Share on other sites

TableA with Fields: A1, A2, A3

TableB with Fields: B1, B2

 

I want to make new records in TableB so that, B1 = A1, and B2 = A2 + A3.

 

I do NOT want B1 and B2 to be calculated fields.

Link to comment
Share on other sites

I feel like we're playing a game of "What am I?" LOL!

 

[ QUOTE ]

I want to make new records in TableB so that, B1 = A1

 

[/ QUOTE ]

This is called import mapping. As I mentioned, an import is required. You would drag B1 field in your import right-pane until it lines up with A1 field in left. Click connection until it makes an equal sign.

 

[ QUOTE ]

and B2 = A2 + A3

 

[/ QUOTE ]

Nope. Can't. You can't combine fields during an import - it's a one-to-one mapping process. You need to either:

 

1) Create a new field in table A which is called a concatenation of A2 and A3. This calculation would look like: A2 & " " & A3. Then when you import into Table B, you map this calculation to your B2 field.

 

2) Add a B3 field in Table B. Then map A2 to B2 and A3 to B3. You can then put B2 and B3 together once imported either via script or calculation (using the concatenation idea above).

 

But talking Table A and Table B and Field 3 does nothing for me. It gives me no vision of what the heck you're doing or why. And without seeing your vision, I'm throwing speculation instead of truly assisting.

 

[ QUOTE ]

I do NOT want B1 and B2 to be calculated fields.

 

[/ QUOTE ]

You are the creator of your own solution. Are B1 and B2 currently calculations in Table B? I assume they are regular fields - which is the ONLY type of field you can import into anyway.

 

Truly, I have no perspective or proportion here. Importing as new records is what you need. Have you tried an import yet (on backup copy of your files)? I think you'll understand what I mean once you TRY it. And knowing your FM version would help a bunch also. wink.gif

 

Pete

Link to comment
Share on other sites

I'm importing a CSV order file with an order item on each row with many columns for the descriptions and options.

 

I want to make Invoice items from each order item, but the Invoicing database is also used for other order types with different columns.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...

Important Information

Terms of Use