Jump to content

Creating 10up Member Directory


JCrocker

Recommended Posts

Hello Good Peoples! I just purchased a copy of Fusion Pro Desktop for my company and am working to incorporate it into our workflow. I am the production manager and now putting on the hat as the sole Data Manager. I am working on a few jobs that were sold before we even had the software and am running into some brick walls trying to learn the software while I create the jobs and things are beginning to pile up quickly. Im finding that somewhat intesive jobs need a very workable knowledge of javascript which unfortunately I do not have, yet. If anyone can help in any way or has any suggestions please please do. Here's the one I've been stumped on currently:

 

Its needed that I create a membership directory for a particular club. The final book is a 5.5 by 8.5 booklet. When opened there are five members on the left and five on the right with each persons info and picture. There are over three hundred members and new members and info can change at any time and they all must flow through the book in alphabetical order. I've attatched a single scanned page that i've been given from the current directory that I must simulate. Seems pretty straightforward but apparently it isn't.

 

I believe I must create a repeatable component but am having serious trouble doing so. I've spoken with many people including a computer programmer and the fusion pro engineers have even sent me the files for the example one pg 127 of the user guide and I am still not getting how to do this seemingle simple job. Feeling pretty stupid so if anyone can help smarten me up and/or lead me in the right direction on this I would be extremely greatful. Seemingly this is my last resort. :o

Link to comment
Share on other sites

  • 2 weeks later...

Yes, I think you want to use a Repeatable Component. The User Guide has a walkthrough of setting up a job with this feature for an office supplies catalog. Your job actually looks a lot like that example, with repeated rows consisting of a picture and some text. You could create a table instead, but that's more coding and less WYSIWYG.

 

So I would try going through that repeated components example in the User Guide and you should get the hang of it.

Link to comment
Share on other sites

Thanks for the response Dan. I have tried to walk through the example in the user manual because it did appear very similar to what I needed to accomplish. A printabe engineer sent me the files for that particular example for me to take a look at but Im still not understanding how to get from point A to B and so on. I understand creating the smaller template but Im not understanding how to call it back using javascript. Also there were only a few products that were used named product 1, 2, 3... and I need to have it call back all of the info for 300+ members and I dont know how to do that. I just couldnt correlate enough info between the final product example and the user guide to accomplish what I need.

I really would like to figure this out but the job has since been pulled to quote at other companies which many poeple were not very happy about. So far I have failed with fusion pro and my owners are seeing it as a waste and I am not having much luck with learning these more complex javascript functions. We do have some very large commitments based off the use of this software for our largest customers and I am getting very concerned on what I will be capable of getting help with to get fusionpro incorporated into our workflow. At this point Im being forced to search for an outside consultant of some sort to help with setting up templates and more complex jobs but am not having much luck even finding someone to pay to help us. If you have any suggestions or options whatsover on what to do please help. Any help would be most appreciated.

 

Thanks

Jeremy

Link to comment
Share on other sites

PTI (Printable) does offer training and paid consulting to assist you in template-building. Sales can help sign you up for either of those.

 

But I can try to help a little more. You'll probably need to read the list of members from an external data file. If you post what you have so far, including a sample of the data, then I, or someone else, may be able to offer more specific suggestions.

Link to comment
Share on other sites

Thanks Dan. I will check into the paid consulting from PTI. I just wasn't having much luck getting the ball rolling. I was told they could build some templates but was also told they don't really do consulting and/or help with setting up jobs and such.

I have attatched everything I have gotten up to this point. The member info data file, pictures and the template I was working on before I hit this wall. Your help is most appreciated. Just let me know what I need to do to figure this one out as I have much more coming down the pipe. I've picked up a ajvascript book and am trying to do whatever I can to gain a better understanding of this software.

 

Jeremy

Link to comment
Share on other sites

Wow Dan! That looks fantastic man I can't thank you enough. Thank you so much for helping out. And you turned it around so quick. Now I just must study and study this to figure out how u put it all together. Especially with only three rules, thats pretty incredible. I'll get back with you if I come across any questions. You are the man, its nice to know that there is help out there. Alright, time to get to work. This forum really does help!:D WooHoo!

 

Thanks again Dan!

Jeremy

Link to comment
Share on other sites

Alright Dan, I think I got everything about how they want it. The large rule you created to get this all to work is just awesome. I understand it for the most part but am still trying to figure out the finer details so i can completely recreate this job separately for learning purposes.

 

One thing though, the positioning of the variable information is correct on the overflow pages of the output file but it is slightly shifted on the very first page. Everything seems to be in the correct and exact same positioning in body page and the template pages but I cant figure out why the info is shifted a little to low on the very first page of the output file. Any ideas? I've attatched the file for you to look at. Thanks again for all your help Dan, it is most appreciated.

Link to comment
Share on other sites

One thing though, the positioning of the variable information is correct on the overflow pages of the output file but it is slightly shifted on the very first page. Everything seems to be in the correct and exact same positioning in body page and the template pages but I cant figure out why the info is shifted a little to low on the very first page of the output file. Any ideas? I've attatched the file for you to look at. Thanks again for all your help Dan, it is most appreciated.

I just played around with the positions of the frames until the foreground text and graphics (from the repeatable component) pretty much lined up with the boxes on your static background. But the relative positions of the lines making up those boxes on that static background are not consistent (either between the first and second background page, or even within a page). So trying to line all that up by hand is never going to be perfect, and I don't think that's really what you want to do anyway.

 

I suggest getting rid of those static background elements, effectively starting with a blank PDF background, and setting frame borders on the variable text and graphic frames instead.

Link to comment
Share on other sites

Alright Dan the man, I just printed out the first proof and I noticed no one has a significant other. In the original file I created the PartnerRule and partner PHF rule to call back the spouses nickname and put a symbol defining if they were a member or not. I tried to find these rules but im not sure how to modify them to make sure they work. You do reference the PartnerRule in the large Javascript rule and my partner rule is still in the template but its not showing up in the composition. Do you have any suggestions as to what needs to be done to get those additional names to show up in the composed file?

 

Thanks a million

Jeremy

Link to comment
Share on other sites

Alright Dan the man, I just printed out the first proof and I noticed no one has a significant other. In the original file I created the PartnerRule and partner PHF rule to call back the spouses nickname and put a symbol defining if they were a member or not. I tried to find these rules but im not sure how to modify them to make sure they work. You do reference the PartnerRule in the large Javascript rule and my partner rule is still in the template but its not showing up in the composition. Do you have any suggestions as to what needs to be done to get those additional names to show up in the composed file?

Sorry, that was an oversight when I was building the template-based logic from your original rules. Here's the updated OnRecordStart rule which pulls in the partner names as well:

var result = "";

var DataFile = new ExternalDataFileEx("ClassificationsDBDump.csv", ",");
endRecordNumber = Math.min(endRecordNumber, DataFile.recordCount);

// Limit number of records in Preview and rule validation to save time.
if (FusionPro.inValidation)
   startRecordNumber = endRecordNumber = CurrentRecordNumber();
else if (IsPreview())
{
   startRecordNumber = CurrentRecordNumber(); // start the preview with this record
   endRecordNumber = startRecordNumber + 4; // 5 records total
}

// Output multiple repeatable components from the data file.
for (var r = startRecordNumber; r <= endRecordNumber; r++)
{
   Print("OnRecordStart: processing record " + r);

   var template = new FPRepeatableComponent("RotaryTemplate");

   // Copy data file fields to repeatable component (template) variables.
   for (var f = 0; f <= DataFile.fieldCount; f++)
       template.AddTextVar(DataFile.GetFieldValue(0, f), DataFile.GetFieldValue(r, f));

   // Convenience function to simplify code below.
   function ExDataField(name) { return DataFile.GetFieldValue(r, name); }

   var PHF = ExDataField("PHF - Paul Harris Fellow").toLowerCase()[0] == 'y' ? "*" : ""
   template.AddTextVar("PHF", PHF);
   var SusPHF = ExDataField("Sustaining Member").toLowerCase()[0] == 'y' ? "+" : ""
   template.AddTextVar("Sus PHF", SusPHF);
   var Benefactor = ExDataField("Benefactor").toLowerCase()[0] == 'y' ? '<f name="Symbol">©</f>' : ""
   template.AddTextVar("Benefactor", Benefactor, true);
   var PartnerPHF = ExDataField("ISPARTNERMEMBER").toLowerCase()[0] == 'y' ? "*" : ""
   var PartnerName = ExDataField("PARTNERFIRSTNAME");
   var PartnerRule = PartnerName ? " - " + PartnerPHF + PartnerName : "";
   template.AddTextVar("PartnerRule", PartnerRule);

   template.AddTextVar("EmailRule", ExDataField("EMAIL") ? " E-mail: " + ExDataField("EMAIL") : "");
   template.AddTextVar("FaxRule", ExDataField("FAXNUMBER") ? " FAX: " + ExDataField("FAXNUMBER") : "");
   template.AddTextVar("_Nickname", ExDataField("NICKNAME") || ExDataField("FNAME"));

   template.AddGraphic("MemberPicture", ExDataField("IMAGE"));
   result += template + "\n\n";

   // Use the record from the Preview Selector when previewing the Template page.
   if (r == CurrentRecordNumber())
       template.UseForPreview();
}

FusionPro.Composition.AddVariable("MainContent", result, true);
return result;

Link to comment
Share on other sites

  • 4 weeks later...

Hey Dan, some changes were made to the data on this rotary and when I composed with the new data I noticed something else as well. The members birthdays are coming out as full dates for example: 5/21/1949

The customers proof and data file is now showing 21-May and that is how they the preview record selector within fusionpro sees it. However in the preview and output it is still converting it to 5/21/1949. Do you have any ideas or suggestions. I tried putting in the rule:

 

var result = Left(Field("BIRTHDAY"), Field("BIRTHDAY").length - 5);

 

and

 

var result = Field("BIRTHDAY");

return Left(result, result.length - 5);

 

But I'm having no luck even getting it reduced to 5/21 in hopes that it will display as 21-May

 

Im not sure where I should add it in the OnRecordStart rule, I've tried a few places and it ends up just not working or causing everything to go blank.

 

Do you have any ideas or suggestions. I have discovered that the .xls file is a readable only. Im wondering if although I changed the view in the BIRTHDAY column to appear as 21-May that somehow fusionpro is only allowed to return 5/21/1949.

 

However, Fusion Pro is seeing and showing 21-May in the Preview Record Selector for BIRTHDAY.

 

Any Ideas

Link to comment
Share on other sites

Here's a screenshot of what im seeing. The preview record selector shows the correct format but the preview and composition does not.

Well, this is a completely different question that's not really related to the 10-up issue, so I would start a new thread.

 

A search of this forum for something like "format date" will return you plenty of results pointing you to the DateFromString and FormatDate functions, which are generally what you need to do stuff like this.

 

However, if the input data source doesn't specify a year, then there's nothing FusionPro can do to massage the data and conjure it up. So you're simply going to have to fix the data.

 

Remember that you're not actually using the .xls file as the input to FusionPro; you're using a .csv file, which presumably was created by opening up the .xls file in Excel and doing a "Save as" to CSV format. So that .csv file can certainly be modified to represent the dates in a different format.

 

If you post the data file (ideally the source .xls file), I might be able to offer more specific suggestions.

Link to comment
Share on other sites

Hi Dan,

I have changed the formatting of the BIRTHDAY column in my data file to display 1-Nov. The problem is that fusionpro is still returning 11/1/1949. If you take a look at the screenshot you can see that in the Record Preview Selector that 1-Nov should be displayed however the full date of 11/1/1949 is being returned in the preview and output.

 

I attached the screenshot and the native data file.

Link to comment
Share on other sites

Okay, I see what the problem is. It's not a date formatting issue. You're mixing up your input files. The Preview Selector is showing you one file, but a different file, as specified in the ExternalDataFileEx call in your rule, is actually being used at composition time.

 

If you change the input file, you also need to change the name of the file that's being loaded in the OnRecordStart rule.

 

I would change the first few lines of the rule to this:

var result = "";

var fileName = FusionPro.Composition.inputFileName;
if (FusionPro.inValidation)
 fileName = "DBDump 1.csv";

var DataFile = new ExternalDataFileEx(fileName, ",");

Note that you still need to specify the name in order to validate accurately in the Rule Editor dialog. However, this will automatically pick up the right file name at composition time, so that what you see in the Preview Selector dialog will match the output.

 

Sorry for not including this earlier; I was trying to keep things a little simpler for the sample I posted (which wasn't supposed to necessarily be the final version, just something to point you in the right direction).

 

P.S. I will merge the new thread back with this one; sorry again for the confusion.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...