Table Single Sourcing
Table Single Sourcing
I have a group of about 5000 documents. All of them contain the same table structure at the same location on the first page. However, the data inside the table must change with each document. I have placed the table in the correct location on the First page of a page layout, but I'm stumped as to how to get the unique data for each document into that table and have it change when I print each document. I'd like not to include the same table structure in 5,000 documents...kinda defeats the purpose of Flare. My print target is a PDF, if that makes a difference.
Any ideas?
Matt
Any ideas?
Matt
Re: Table Single Sourcing
What type of information are you trying to put into the table? If there are system or user variables then you can insert those variables into the table in the page layout, and it should theoretically work to pull in the appropriate data when you build the output. Although you might want to put the table of info into a footer frame, unless you're never worried about other text on the first page pushing the table to the next page.
Note that in order to get the First page of the page layout applied to each document then you'd have to specify that each document is the start of a new chapter so that you can reselect the page layout and select the First page. Otherwise, it'll default to using the Normal or Left/Right pages, depending on what pages you have in the page layout.
Note that in order to get the First page of the page layout applied to each document then you'd have to specify that each document is the start of a new chapter so that you can reselect the page layout and select the First page. Otherwise, it'll default to using the Normal or Left/Right pages, depending on what pages you have in the page layout.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: Table Single Sourcing
The data is a revision number, date, and a corporate number that tracks the history of each revision, plus a detail description of the most recent revision. In other words, it's unique data hand entered for each document, but the table structure itself is identical in all the documents.
I initially had it in a footer frame because I want it static, but the Flare support people put it in a decoration frame in an effort to solve my problem. They didn't solve it.
I initially had it in a footer frame because I want it static, but the Flare support people put it in a decoration frame in an effort to solve my problem. They didn't solve it.
Re: Table Single Sourcing
And yes, I specified them all as a new chapter.
Re: Table Single Sourcing
Alrighty...talked to several other people, and it's starting to look like this is not a thing Flare can do.
OK...so I include the table as a topic for each document. How do I get that table to appear in the same location on the first page of every document?
OK...so I include the table as a topic for each document. How do I get that table to appear in the same location on the first page of every document?
Re: Table Single Sourcing
Anyone out there besides the crickets? Here's the question:
I have 5,000 topics that contain an identical table structure filled with unique information, each of which applies to one of 5,000 documents. Each document is from 1 to 10 pages long. My target is a PDF and I'm using Flare 5. How do I get the table topic for each document to appear in the same location on the first page of each document?
I've talked with some other people...so far, no hits.
Anyone? Bueller...Bueller..
I have 5,000 topics that contain an identical table structure filled with unique information, each of which applies to one of 5,000 documents. Each document is from 1 to 10 pages long. My target is a PDF and I'm using Flare 5. How do I get the table topic for each document to appear in the same location on the first page of each document?
I've talked with some other people...so far, no hits.
Anyone? Bueller...Bueller..
Re: Table Single Sourcing
Make sure you submit a feature request at http://www.madcapsoftware.com/bugs/submit.aspx. Having this type of metadata available for documents is becoming more common, so it's a functionality MadCap should add. It seems like it wouldn't be too difficult to have a metadata set like a variable set in the Project Organizer, where you could configure the metadata fields (name, data type, if they're required or not), then in the Properties screen for a topic (or in a side panel), input those fields with the relevant data for that topic.mattman63 wrote:Alrighty...talked to several other people, and it's starting to look like this is not a thing Flare can do.
You could position it at the exact same location if you were building WebHelp output and were using a DIV with a set bottom value, but although you can use DIVs in print output, I don't think it honors positioning in that way. I think your only option is to use a template file or a snippet that contains a table with the first row or cell being set to a specific height and the second row (where your table data is contained) being a set height as well. So they can't type too much in the top cell, but if they type too little, the table at the bottom still won't move up.mattman63 wrote:OK...so I include the table as a topic for each document. How do I get that table to appear in the same location on the first page of every document?
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: Table Single Sourcing
Wow...a feature request. ME? Sheesh, I'm just the newest of newbies. To tell you the truth, I understood about .01% of your last post. Maybe you should submit it. All I'd say is "Make it so I can put an identical table structure with unique information in the same location on the first page of 5,000 documents."
Re: Table Single Sourcing
I don't think that table template idea will work unless I want to constantly monitor the text flow of 5,000 documents, which I don't. Sheesh, other aspects of Flare are so cool...it seems like I should be able to DO this.
Re: Table Single Sourcing
I would go back to your original idea and put the table in the page layout.
How are these 5000 documents set up? Are all the topics in a single Flare project?
How are these 5000 documents set up? Are all the topics in a single Flare project?
Re: Table Single Sourcing
Yep. All the same kind of documentation, all in a single Flare project.
Currently, I have the table structure on the page layout and everything looks great. The trouble is populating the table with unique information for every document I print. Any ideas?
Currently, I have the table structure on the page layout and everything looks great. The trouble is populating the table with unique information for every document I print. Any ideas?
Re: Table Single Sourcing
I would expand the footer on the first page of the page layout to include the table. Then I'd create a variable for each field and place the variables in the appropriate table cells. When it's time to generate a PDF, I'd change the variable definitions as needed and generate the document.
Re: Table Single Sourcing
As he said, he can put the table structure in the page layout, but it'll be the same info displayed on every First page of every "chapter" -- the info won't be unique to each First page.KGaetz wrote:I would go back to your original idea and put the table in the page layout.
I tried a little trick trying to use hidden form fields in a topic and using ASP code in the page layout, but it didn't like the <%. I wonder if it would have worked if I'd used the code equivalent to the < sign? I'll have to try that.
Oooh, I just thought of a workaround. You'd still have to edit each topic, or you might be able to do a find-and-replace with regular expressions if the information is already in your topics. The idea is that you use some of the system variable options that are available in Flare for headings. So you still use your page layout, insert a table into the footer frame, then insert a header variable, which are identified by the levels. So h1 is Level 1, h2 is Level 2, etc. You only have six levels, so if you go three levels deep in your topics, then you can use the last three levels (h4 to h6) and apply them to the data in your topic.
In the stylesheet, you set the display property for those headings to "none", which will hide the contents of those headings in the topics themselves, but they will be picked up in the variable in the footer. You'll still be able to see the contents in the topic when you're editing, but when you build the output, the display:none attribute will be applied to the headings, so their contents won't appear, except in the footer.
So in your topic, you might have something like:
<h4>Revision number: 1.3 – 4/14/2010</h4>
<h5>Corporate number: 1234</h5>
<h6>Description: blah blah, make sure you don't have too much info to fit into the table</h6>
Then in the table in the footer frame if your First page of the page layout, you'd select the footer frame, press F2 to edit its contents (click No at the prompt), insert the table, then in the first cell, go to Insert > Variable, select Heading, then select Level 4. You'd do the same in the other cells for Level 5 and Level 6. In the footer frame, you'd see [Heading.Level 4], [Heading.Level 5], and [Heading.Level 6]. When you generate the PDF output, the First page of the page layout will look for text coded with h4, h5, and h6, respectively, and place their contents in the table in the footer.
Best that I can come up with for now.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: Table Single Sourcing
Somewhere in this thread, he mentioned that the documents are only a few pages long. I'm assuming that eliminates the need for chapters. Granted, this solution would be problematic for longer books.
Re: Table Single Sourcing
Depends on how you define chapter. I'm using "chapter" in that the only way to specify a specific page to use on a topic is to start a new "chapter" on that topic in the TOC, select the page layout to use (even if the same one is being used), and then specify which page of the page layout to start that chapter with. In this case, he wants the First page to be used. So if a topic does go to two pages, he won't see the table on the second page.KGaetz wrote:Somewhere in this thread, he mentioned that the documents are only a few pages long. I'm assuming that eliminates the need for chapters. Granted, this solution would be problematic for longer books.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: Table Single Sourcing
These documents are 1-10 pages long, but there's 5,000 of them, and they change often. You want me to edit all the variables in the table each time I have to update a document? I would get nothing else done!
Tinker, the only problem with your workaround is that I need 32 variables. If the table is completely filled with data, it's ten revision numbers, ten corporate numbers, ten dates, a current revision description, and the current revision number - 32.
All I want is for Flare to take information I have in a topic and put it in the cells of a blank table that I have on the page layout. I don't want to enter all the table information each time I update a document. I just want to add the new revision number, description, corporate number, and date, and keep all the other existing data in the table the same.
Or failing that, I want Flare to put the populated table, which is a topic associated with a target, in the same location on the first page of any document I update.
I just can't believe Flare can't do this. There has to be a way. I'm going to look really bad. I'm the one who recommended Flare.
Tinker, the only problem with your workaround is that I need 32 variables. If the table is completely filled with data, it's ten revision numbers, ten corporate numbers, ten dates, a current revision description, and the current revision number - 32.
All I want is for Flare to take information I have in a topic and put it in the cells of a blank table that I have on the page layout. I don't want to enter all the table information each time I update a document. I just want to add the new revision number, description, corporate number, and date, and keep all the other existing data in the table the same.
Or failing that, I want Flare to put the populated table, which is a topic associated with a target, in the same location on the first page of any document I update.
I just can't believe Flare can't do this. There has to be a way. I'm going to look really bad. I'm the one who recommended Flare.
Re: Table Single Sourcing
Either I don't understand what you want to do or you didn't understand my suggestion.
I'm not saying you put ten revisions numbers, ten corporate numbers, ten dates, etc., in the same table in the page layout. It sounded like you were saying the information you want to have put into the table is already contained in the topic. I'm saying you can pull that information from the topic into the table automatically when the output is being built, by using variables that are tied to the heading styles.
So say in topicA you have four paragraphs (and by paragraphs I mean <p> tags, not multiple lines of text). First paragraph says "Revision number: 1.3". Second paragraph says "Corporate number: 1234". Third paragraph = "Description: blah blah blah", fourth paragraph = "Current revision number: 1.2". For topicB, say you have the same four paragraphs, but their contents are "2.1", "4444", "blah2 blah2", and "2.0", respectively.
With my suggestion, you'd have to change the first set of paragraph tags to h3, second set of <p> tags change to h4, third set to h5, last set to h6. (You could save a heading level if you combined the new and old revision fields into the same paragraph.)
Since I'm assuming you don't want those paragraphs to appear in the regular topic content as well as the table, I recommended setting the display attribute for h3, h4, h5, and h6 to "none", so those paragraphs won't appear in the topic when you build the output. Their contents, however, would be used to populate the table.
In the TOC, you set a new chapter to start on topicA and use the First page of the layout. You'd also set a new chapter to start on topicB and also use the First page layout.
When you build the output, Flare applies the appropriate layout to each page. Where it finds a "start new chapter" and First page, it will pull the headings from the topic and place them in the table and "stamp" that table in the footer of the first page of that topic. So the table on the first page of topicA in the output would have "Revision number: 1.3", "Corporate number: 1234", "Description: blah blah blah", and "Current revision: 1.2". When it gets to topicB, it sees it's supposed to be the start of another chapter with the First page, so it will pull the info from topicB, put it into the table, and "stamp" that table in the footer of the first page of topicB. So topicB's table would display "Revision number: 2.1", "Corporate number: 4444", and so on.
So, yes, you have to modify each topic in that you have to convert paragraph tags to heading tags, but you can use regular expressions to find <p>Revision number: xxx</p> and change it to <h3>Revision number: xxx</h3>, without modifying the information represented by xxx. I'm not that familiar with regular expressions, just what they can do, so you'd have to do some research into how to format the regular expression. Just make sure you specify in Flare's find-and-replace pane that you want to search in source code and you want to use regular expressions.
Does that make more sense?
I'm not saying you put ten revisions numbers, ten corporate numbers, ten dates, etc., in the same table in the page layout. It sounded like you were saying the information you want to have put into the table is already contained in the topic. I'm saying you can pull that information from the topic into the table automatically when the output is being built, by using variables that are tied to the heading styles.
So say in topicA you have four paragraphs (and by paragraphs I mean <p> tags, not multiple lines of text). First paragraph says "Revision number: 1.3". Second paragraph says "Corporate number: 1234". Third paragraph = "Description: blah blah blah", fourth paragraph = "Current revision number: 1.2". For topicB, say you have the same four paragraphs, but their contents are "2.1", "4444", "blah2 blah2", and "2.0", respectively.
With my suggestion, you'd have to change the first set of paragraph tags to h3, second set of <p> tags change to h4, third set to h5, last set to h6. (You could save a heading level if you combined the new and old revision fields into the same paragraph.)
Since I'm assuming you don't want those paragraphs to appear in the regular topic content as well as the table, I recommended setting the display attribute for h3, h4, h5, and h6 to "none", so those paragraphs won't appear in the topic when you build the output. Their contents, however, would be used to populate the table.
In the TOC, you set a new chapter to start on topicA and use the First page of the layout. You'd also set a new chapter to start on topicB and also use the First page layout.
When you build the output, Flare applies the appropriate layout to each page. Where it finds a "start new chapter" and First page, it will pull the headings from the topic and place them in the table and "stamp" that table in the footer of the first page of that topic. So the table on the first page of topicA in the output would have "Revision number: 1.3", "Corporate number: 1234", "Description: blah blah blah", and "Current revision: 1.2". When it gets to topicB, it sees it's supposed to be the start of another chapter with the First page, so it will pull the info from topicB, put it into the table, and "stamp" that table in the footer of the first page of topicB. So topicB's table would display "Revision number: 2.1", "Corporate number: 4444", and so on.
So, yes, you have to modify each topic in that you have to convert paragraph tags to heading tags, but you can use regular expressions to find <p>Revision number: xxx</p> and change it to <h3>Revision number: xxx</h3>, without modifying the information represented by xxx. I'm not that familiar with regular expressions, just what they can do, so you'd have to do some research into how to format the regular expression. Just make sure you specify in Flare's find-and-replace pane that you want to search in source code and you want to use regular expressions.
Does that make more sense?
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: Table Single Sourcing
Alrighty...I think I understand what you're saying, but I have some questions that may show that I don't, lol.
I just read about these header variables. As I understand it, for a given target, Flare searches topics associated with that target for verbiage that is set to a header style (say h3), and inputs that verbiage into the variable. Okay...you say to make the style of a set of three data items to h3. My question is this: How is Flare going to separate the data items? If I have an h3 variable in a table cell, isn't Flare going to input whatever it finds designated as h3 in that one variable; namely, all three data items? Also: How is Flare going to know which data item to put in which table cell? The data must display in the table in a particular order (by rev number). Also: What if a particular topic has ten sets of data items? The header variables only go to h6.
You know, I just read about "custom variables". They aren't variables at all; they have defined values. That's the perfect definition of what a variable is NOT, lol. They're like database fields, only less versatile. That would be a better name for them, either "fields" or "placeholders" or something like that.
Man, I'm starting to get a bad feeling about this Flare. This is not going to be nearly as easy as I was led to believe...
I just read about these header variables. As I understand it, for a given target, Flare searches topics associated with that target for verbiage that is set to a header style (say h3), and inputs that verbiage into the variable. Okay...you say to make the style of a set of three data items to h3. My question is this: How is Flare going to separate the data items? If I have an h3 variable in a table cell, isn't Flare going to input whatever it finds designated as h3 in that one variable; namely, all three data items? Also: How is Flare going to know which data item to put in which table cell? The data must display in the table in a particular order (by rev number). Also: What if a particular topic has ten sets of data items? The header variables only go to h6.
You know, I just read about "custom variables". They aren't variables at all; they have defined values. That's the perfect definition of what a variable is NOT, lol. They're like database fields, only less versatile. That would be a better name for them, either "fields" or "placeholders" or something like that.
Man, I'm starting to get a bad feeling about this Flare. This is not going to be nearly as easy as I was led to believe...
Re: Table Single Sourcing
Hey, look at that! Madcap just designated me as a Baby Propeller Head! Ain't I a cutie?
Re: Table Single Sourcing
They're definitely variables -- their contents vary by target. Each target can use the same htm files, with different values for each variable. I think that meets the definition of variable.mattman63 wrote:You know, I just read about "custom variables". They aren't variables at all; they have defined values. That's the perfect definition of what a variable is NOT, lol. They're like database fields, only less versatile. That would be a better name for them, either "fields" or "placeholders" or something like that.
KGaetz suggested the solution I would try, though I wouldn't include it in the page layout. I'd include it *in* the content, then add variables for all of the information that will change -- version numbers, etc., whether it's in the table or the content of the page. Then when I go to update the document, simply update the target's variable list, and that target's variable values will all change.
Flare v6.1 | Capture 4.0.0
Re: Table Single Sourcing
No, I said set the first data item to h3, the second item to h4, the third to h5, the fourth to h6. That's what is used to separate the data items -- the level 3 variable will pull the h3 info, level 4 will pull h4, etc.mattman63 wrote:Okay...you say to make the style of a set of three data items to h3. My question is this: How is Flare going to separate the data items?
Sorry, from the original post, it sounded like you just had four fields of data that varied from topic to topic. If your topics have anywhere from four to ten items then the option won't work.mattman63 wrote:Also: What if a particular topic has ten sets of data items?
Yeah, I tried manually creating an h7 in the stylesheet and tried manually modifying the level 6 variable to say level 7, but it didn't work. So it will only go up to h6.mattman63 wrote:The header variables only go to h6.
You could possibly use custom variables, but you'd have to come up with multiple page layouts to handle the multiple combinations of variables and apply the appropriate version to each topic.
I think it would be far easier to go with the other option I mentioned, which is to create a topic template or a snippet that contains a table, and use the table for controlling the spacing on the first page. So you'd maybe create a multi-row, multi-column table, with the first row being a set height, say 4 inches. You'd merge the cells in that first row and that row would contain your intro text for the topic. The remaining rows/columns would be where you'd put your data items. Setting the first row to 4 inches (for example) will make sure the data items always falls in the same place from topic to topic. I'd probably set those tables up in a snippet with a short placeholder text in the first row, and the data item headers (Revision, Corporate number, Description) in the lower half of the table. Then when you create a new topic, you insert the snippet and convert it to text, which allows you to modify the text in the table. You could create multiple snippets for multiple numbers of data items and insert whatever one works for that particular topic.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: Table Single Sourcing
Aaah...so you're saying I need a separate target for each one of these 5,000 documents to make this thing work. Well, that's certainly better than can't be done. However, I HAVE to put the table on the page layout because that's the only way I can locate it in the same location on the first page of every document, unless you have some other ideas about that.
You know, I'm thinking this is simply not the kind of documentation where Flare really shines. They're short, there's no verbiage in them that is used in other documents, they're all unique - the only thing that repeats is the page layout. I don't think I'm gaining anything by putting this documentation into Flare aside from the multiple output thing. I think when I start flaring other documentation that has a lot of verbiage reused, I'll be much more tickled than I am now.
You know, I'm thinking this is simply not the kind of documentation where Flare really shines. They're short, there's no verbiage in them that is used in other documents, they're all unique - the only thing that repeats is the page layout. I don't think I'm gaining anything by putting this documentation into Flare aside from the multiple output thing. I think when I start flaring other documentation that has a lot of verbiage reused, I'll be much more tickled than I am now.
Re: Table Single Sourcing
Lisa,
Well, I really don't like that table template thing. These documents get changed all the time. I'd have to monitor them all the time to make sure not too much text is in that first cell, or adjusting it so the rev table lands in the right location. That's a 5,000 document maintenance headache I do not want. I just want the table to land in the right location all the time automatically without me worrying about it. I want all the text to just flow naturally, not slice a chunk of it into a table and the rest of it flow naturally. However, I do like that your solution sounds kind of unorthodox; always like to see what's outside the box. I don't mind making 5,000 page layouts or targets to make it work; once it's done, it's done - no ongoing worries.
Well, I really don't like that table template thing. These documents get changed all the time. I'd have to monitor them all the time to make sure not too much text is in that first cell, or adjusting it so the rev table lands in the right location. That's a 5,000 document maintenance headache I do not want. I just want the table to land in the right location all the time automatically without me worrying about it. I want all the text to just flow naturally, not slice a chunk of it into a table and the rest of it flow naturally. However, I do like that your solution sounds kind of unorthodox; always like to see what's outside the box. I don't mind making 5,000 page layouts or targets to make it work; once it's done, it's done - no ongoing worries.
Re: Table Single Sourcing
The table is about 1 inch in height and the bottom of it lands .75 inch from the bottom of the paper. I have it working great right now, just no data in it.