Jump to content

printing layouts from repeating fields


Amycoiteux

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

Recommended Posts

  • Newbies

I am using fmpro7 and would like to print multiple layouts from a related file layout that has a field with 25 repetitions on it.

The original layout's repeating field is called "test description". Each test needs to print on a separate identical layout.

I have created 25 duplicate layouts with the repeating field formatted as each number of the repeating "test description" field.

My script opens each layout, prints the layout, then opens the next layout.

How do I get it to stop and go back to the original layout when it gets to an empty row in the repeating field?

Thanks in advance,

Amy

Link to comment
Share on other sites

Have you considered using a portal instead of a repeating field? It will allow you to print all the values in a single print job from the child table. Are you familiar with how portals work? They will allow the same interface as your repeating field but enable easier printing.

Link to comment
Share on other sites

  • Newbies

I am concerned about loosing the current data in the field so I can't change it. I am not the person who originally set up the data so I don't want to re-organize the file structure. I am just trying to get it to work with what I've got.

Can you help me with inserting an if then statement that could work for my situation please.

Something such as

If test description[1] is empty escape the script and go back to original layout.

else print the current layout

Then go to 2nd identical layout.

If test description[2] is empty escape the script and go back to original layout

else print the current layout.

An so on...

I don't know how to script something like this

Thanks

Link to comment
Share on other sites

You can move the data from a repeating field into another table as separate records through a special import feature. When you import, the last dialog will ask you if you want to split repeating fields. This will place each repetition in a new record in a regular field. Each repetition from the same record will get the same ID as long as you import the key field (non-repeating field) along with it. This will serve as your relationship so all you will have to do is place a portal on the layout and the records will appear just like they did when they were in the repeating field.

One of the things I enjoy doing is helping people out. Telling you how to keep using a denormalized database with a script is not helping you. While converting to a true relational structure may be beyond your current skill set, I would recommend at least giving it a try. If you make a backup, you won't have to worry about destroying the data.

Link to comment
Share on other sites

This topic is 6516 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.