Jump to content

Search the Community

Showing results for tags 'variable'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome
    • Start Here!
    • News
  • Software-Related Talk
    • Documentation
    • Getting Started
    • The JavaScript Library
    • FusionPro® VDP Creator
    • FusionPro® VDP Producer
    • FusionPro® VDP Server (API)
    • FusionPro® Expression®
    • MarcomCentral®
  • Support
    • Issues, Questions, Etc.
    • Digital Workflow Documents
    • Fonts
  • Off Topic
    • Customer Polls
    • Job Board (Moderated)
    • Reviews, Rants, and General Musings

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Location


Occupation


FusionPro VDP software version


OS


Acrobat Version


Homepage


ICQ


AIM


Yahoo


MSN


Skype


User Title

Found 4 results

  1. Hello All, I found a post from Dan that got me 40-50% of the way to my goal, but I am struggling as I am a total Noob. I am working with a project that has up to 1200 different versions/ possible pages, front and back. Each page can have up to 50 variables, all in various locations. I am trying to make this as simple as possible, and found this code from a previous post which showed promise. data = new ExternalDataFileEx('/path/to/data.csv',','); for (var i=1; i<=data.recordCount; i++) { var frame = FindTextFrame(data.GetFieldValue(i, 'Frame')); var att = ['width','height','x','y']; for (var n in att) if (a = data.GetFieldValue(i, att[n])) frame[att[n]] = a; frame.content = RawTextFromTagged(CreateResource(data.GetFieldValue(i, 'content')).content); } Catch is that I am trying to use Formatted Text Resources, to make the fonts easier to manage, in the content location. All I can think to do is create a huge amount of Switch statements that control the FTR being matched to the Version codes I have and then calling that rule in the 'frame.content' part of this code. Sorry if I am losing anyone, this is not an easy task and has so many moving parts.
  2. [sOLVED] I am working on several items in this field including multiple possible body pages based on column value, overflow, and variable tables based on key customers and multi-row external data. My big issue right now is that my tables display on Preview but nothing shows up during Composition. I am assuming it is simple missed code or misplaced code on my behalf. OnRecordStart if (Field("MCE_Letter_Code") == "1") { FusionPro.Composition.SetBodyPageUsage("PP006", false); FusionPro.Composition.SetBodyPageUsage("PP006_2", false); FusionPro.Composition.SetBodyPageUsage("PP006_3", false); FusionPro.Composition.SetBodyPageUsage("PP006_Overflow",false); FusionPro.Composition.SetBodyPageUsage("PP009", false); FusionPro.Composition.SetBodyPageUsage("PP010", false); FusionPro.Composition.SetBodyPageUsage("PP026", false); } else if (Field("MCE_Letter_Code") == "6") { FusionPro.Composition.SetBodyPageUsage("PP001",false); FusionPro.Composition.SetBodyPageUsage("PP001_2",false); FusionPro.Composition.SetBodyPageUsage("PP001_Overflow",false); FusionPro.Composition.SetBodyPageUsage("PP009", false); FusionPro.Composition.SetBodyPageUsage("PP010", false); FusionPro.Composition.SetBodyPageUsage("PP026", false); } else if (Field("MCE_Letter_Code") == "9") { FusionPro.Composition.SetBodyPageUsage("PP001",false); FusionPro.Composition.SetBodyPageUsage("PP001_2",false); FusionPro.Composition.SetBodyPageUsage("PP001_Overflow",false); FusionPro.Composition.SetBodyPageUsage("PP006", false); FusionPro.Composition.SetBodyPageUsage("PP006_2", false); FusionPro.Composition.SetBodyPageUsage("PP006_3", false); FusionPro.Composition.SetBodyPageUsage("PP006_Overflow",false); FusionPro.Composition.SetBodyPageUsage("PP010", false); FusionPro.Composition.SetBodyPageUsage("PP026", false); } else if (Field("MCE_Letter_Code") == "10") { FusionPro.Composition.SetBodyPageUsage("PP001",false); FusionPro.Composition.SetBodyPageUsage("PP001_2",false); FusionPro.Composition.SetBodyPageUsage("PP001_Overflow",false); FusionPro.Composition.SetBodyPageUsage("PP006", false); FusionPro.Composition.SetBodyPageUsage("PP006_2", false); FusionPro.Composition.SetBodyPageUsage("PP006_3", false); FusionPro.Composition.SetBodyPageUsage("PP006_Overflow",false); FusionPro.Composition.SetBodyPageUsage("PP009", false); FusionPro.Composition.SetBodyPageUsage("PP026", false); } else if (Field("MCE_Letter_Code") == "26") { FusionPro.Composition.SetBodyPageUsage("PP001",false); FusionPro.Composition.SetBodyPageUsage("PP001_2",false); FusionPro.Composition.SetBodyPageUsage("PP001_Overflow",false); FusionPro.Composition.SetBodyPageUsage("PP006", false); FusionPro.Composition.SetBodyPageUsage("PP006_2", false); FusionPro.Composition.SetBodyPageUsage("PP006_3", false); FusionPro.Composition.SetBodyPageUsage("PP006_Overflow",false); FusionPro.Composition.SetBodyPageUsage("PP009", false); FusionPro.Composition.SetBodyPageUsage("PP010", false); } else { } return ""; OnJobStart //Link to the external data file. data = new ExternalDataFileEx("data_feed.csv", ","); if (!data.valid) { ReportError("Cannot successfully read/find the external data file."); } Rule_DataTable //The following if statement will detect if we are currently in preview mode or editing this rule (versus composing output). if(FusionPro.Composition.isPreview == true || FusionPro.inValidation == true) { Rule("OnJobStart"); } //Create empty var table = []; var tbl = []; //Get a count of the total number of records in the external data file NumberOfRecords = data.recordCount; var type = [ [' '] //Header ]; //Create Table var myTable = new FPTable; myTable.AddColumns(13000, 2000, 20000, 8500, 6500); tbl.push(["", "", "Provider Name", "Phone Number", "Miles Away"]); //Header Rows //Now, loop through all records in the external data file and find the records for (var n=1; n<=NumberOfRecords; n++) { function ExField(field) {return data.GetFieldValue(n, field);} if (Field("MCE_Case_Number") == ExField("Case_Number")) { type.forEach(function(s) { var [provider, phone, miles] = s; provider = ExField("Prov_Name"); phone = ExField("Prov_Phone").replace(/^[\D]*(\d{3})[\D]*(\d{3})[\D]*(\d{4})$/, "($1) $2-$3"); miles = FormatNumber("0.0", ExField("Prov_Mileage")/100); tbl.push(['Check to choose this provider', '', provider, phone, miles]); }); } } // Formatting for (var i=0; i<tbl.length; i++) { var row = myTable.AddRow(); var cell = row.Cells[0]; row.minHeight = 2000; cell.Margins = new FPTableMargins; cell.Margins.Bottom = 0; row.CopyCells (0,1,2,3,4); if (i >= 1) myTable.Rows[i].Cells[1].SetBorders ("Thin", "Black", "Top", "Bottom", "Right", "Left"); if (i == 0) cell.HStraddle = 2; myTable.Rows[0].Cells[1].Bold = "On"; cell.VAlign = "Middle"; row.CopyCells (1,2,3,4); myTable.Rows[i].Cells[2].HAlign = "Left"; myTable.Rows[i].Cells[3].HAlign = "Center"; myTable.Rows[i].Cells[4].HAlign = "Right"; var [col0, col1, col2, col3, col4] = tbl[i]; row.SetContents (col0, col1, col2, col3, col4); } myTable.AddRow(1); //Blank row for seperation //Push variable into Array table.push(myTable.MakeTags()); return table; Text Frame If you want a doctor not listed in the chart below, write the name and city on the lines below. Name: City: «Rule_DataTable» Person completing this form: Again I get the results I need from preview but the composition file is well lacking the data table. Suggestions? Another set of eyes on my code helps a lot.
  3. This is my first Post, bare with me! Im building an 8.5x11 program. With no imposition needed. Just a Multipage PDF. 1. Basically Im having it where the end user can choose from a drop down list of different page layouts. They are able to use the same page layout if they wanted. (example: They choose speaker layout for their first page and they also can use the speaker layout for the 6th page.) In fusion pro I would have all my pages set to unused, I would do a on record start rule for each page layout. (If welcome page is selected, pull in welcome_page, and so on...) When the user pulls in speaker layout and fills it out, and then they pull in the same page again, would it populate what they filled out in the first layout into the page if they choose the layout again (Which I don't want)? So basically can I have them use the page twice using the same variable/page? 2. On top of them choosing which layout they want Im wanting the user to choose how many pages they want, 4, 8 or 12. I do not know how I would go about doing this? So remember all my pages with be different variable page layouts, so how would I tell Fusion Pro, if User selects 4 pages pull in 4 pages? Then they would choose their 4 page layout options from the drop down and it would call in the page layouts? Can Fusion Pro Do this? Im needing some guidance, or some helpful information on how I can execute this. This template will be going up into Marcom. Hopefully Im making since Thanks
  4. I have a 12 page booklet that I run monthly. Every month the booklet content and addresses change, but the variable text field and formatting don't (the headers in my data file never change). Is there a way to copy a text frame from one document to another? I have been able to copy/paste a text frame on the same page, but haven't been able to copy/past onto a different page within the same document, or to a different document alltogether. Is this possible?
×
×
  • Create New...