Jump to content

Transfer data between layouts


Dougb

This topic is 6578 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I have a FMP7 file that has 6 separate layouts. I want to have the ability to take the data that is entered into a record in layout X and transfer the related fields(within the related tables) into layout Y.

I'm sure this is very elementary, but due to my late hours and lack of brain power, I'm not getting anywhere.

Any help would be greatly appreciated.

Thanks in advance...

Doug

Link to comment
Share on other sites

Also try "Relookup" script step.

Example from the FM help files.

Show All Records

Go to Layout ["Data Entry"]

Go to Field [Table1::Invoice Number]

Set Field [Table1::Invoice Number; Max(Table1::Invoice Number)]

Relookup Field Contents [No dialog, Table1::Customer ID]

Link to comment
Share on other sites

  • Newbies

Copy the data and then enter it into a new layout. The first layout is a "preliminary info" sheet for a photographer. Then when the client wants to go ahead and use his services, I want to take the data from the preliminary info sheet and transfer it to the "contract" layout...

Does that make sense?

Thanks...

Doug

Link to comment
Share on other sites

Yes and no. It does make sense, but I think there might be a better way of going about it. How about creating the preliminary data in the contract table (you are confusing the word layout with table. Layouts refer to the visual interface, where table refers to where the data is stored, or how it is normalized, if you will). When preliminary contract is approved, you could just tick a checkbox indicating that it is active.

With your design, you would have to either import the record between the tables, or manually set all the fields using a script with n set field steps, where n is the number of fields in either table. Or set a relationship between the two, define each field in Contacts as a lookup to Preliminary, and set the key (What Breezer was suggesting, I believe).

All of these involve much more work than having a status field in your contracts table.

-Raz

Link to comment
Share on other sites

  • Newbies

Thanks again Raz..

The one problem is that the client does his business in the order I described and doesn't want to change that... so I may have to do the long way around...

You're right about the layout/table thing, and I think I need to redesign the tables and relationships to make this work smoother.

Thanks again for taking the time w/ me..

Take care.

Doug

Link to comment
Share on other sites

The one problem is that the client does his business in the order I described and doesn't want to change that...

That shouldn't matter. You could design it so nothing would seem to have changed from their point of view.

You could use filtered portals to only display active contracts or preliminary contracts, both of which would be in the same table. Run a search on "Filtered Portals" if you are unfamiiar with the technique -there are plenty of posts. It is pretty easy, and comes in quite handy.

Regardless, good luck!

-Raz

Edited by Guest
Link to comment
Share on other sites

I have designed a sample file to demo how you can approach this. See Attached, it's very basic but you can add some bells and whistles once you understand the concept. Eventually, you will find portals are much easier to use. You can achieve the same result with a portal without using any scripts but scripts are better in explaining the concept.

CreateRelatedRecord.zip

Link to comment
Share on other sites

This topic is 6578 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.