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

Copying fields without navigation


Wuzzbent
 Share

Recommended Posts

Hello everyone,

Being new to filemaker but not databases in general, I have a question. Is there a way to copy fields in one table to another table without having to navigate through the layouts?

 

Second question.

I have a master accounts table that has the set prices for our services. When a service record is created, I want to reference the master table for the initial prices but I don't want any changes that are done to the service record to reflect the original master record prices. I basically want to reference the master price table for the inital prices but any modifications made to the reference to not reflect the master price list, Is there a good way to do this without having to copy everything over?

 

Thanks

Wuzzbent

Link to comment
Share on other sites

Hello everyone,

Being new to filemaker but not databases in general, I have a question. Is there a way to copy fields in one table to another table without having to navigate through the layouts?

 

I assume you mean copy the field contents from the fields of one table to the fields of another, and not copy the field definitions from one table to another?

 

There are many ways to do it without doing much navigating between layouts.

 

a) If the two tables are related to each other, you merely need to be on a layout that isn't out-of-relationship to those two tables, and then you do this:

 

Set Field [Table B::FieldName X, Table A::FieldName X]

Set Field [Table B::FieldName Y, Table A::FieldName Y]

Set Field [Table B::FieldName Z, Table A::FieldName Z]

 

b) If the two tables are not related, you pretty much do need to navigate from a layout that can display Table A fields (either a Table A layout or a layout of a table that's related to Table A) to a layout that can display Table B fields (either a Table B layout or a layout that's related to Table B)...and if you haven't already done so, you need to bring up the specific records in each table that you want to use for source and destination... but the fields themselves do not have to be on the layouts you navigate to:

 

Perform Find []

Set Variable [$X, Table A::FieldName X]

Set Variable [$Y, Table A::FieldName Y]

Set Variable [$Z, Table A::FieldName Z]

Go to Layout [Table_B List View]

Perform Find []

Set Field [Table B::FieldName X, $X]

Set Field [Table B::FieldName Y, $Y]

Set Field [Table B::FieldName Z, $Z]

Go to Layout [original layout]

 

There are also a double-handful of other methods of transferring the data from table to table.

 

Second question.

I have a master accounts table that has the set prices for our services. When a service record is created, I want to reference the master table for the initial prices but I don't want any changes that are done to the service record to reflect the original master record prices.

 

What you want is a lookup field in Service Records. Call that field "Price", it should be defined as a lookup from Master Accounts, looking up from the "Price" fieldin Master Accounts. The two tables would be related by Service Code or whatever unique identifier represents that priced item.

 

Lookup is an Auto-Enter option available in the field definition.

Link to comment
Share on other sites

nitpicking: wuzzbent has v7, so he would need to use globals for method #2, since script variables are not available in v7

 

maarten

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use