jwhittaker
Members-
Posts
172 -
Joined
Everything posted by jwhittaker
-
Return Multiple Graphics into one Graphic Box
jwhittaker replied to bobhandyside's topic in Graphic Rules
Bob, I think you want a text frame and use an inline graphic rule. You can only add one graphic into a graphic frame. There is a pre-defined rule when creating a text rule called "Inline Graphic Rule" You could then use conditional logic to add whatever logo you need. Here is a link to something very similar to what you are looking for. http://forums.pti.com/showthread.php?p=27648&highlight=Inline+Graphics#post27648 Jon- 1 reply
-
- graphic box
- graphic frames
-
(and 1 more)
Tagged with:
-
Scotts, I see now, I had just noticed your original frames were named Table1, Table2 and Table3. I duplicated your page and created a new rule called Table_header. This template is based on the rule I had sent back called Table_with_header. I modified it for your instance. Line 38 is where you set the Header row. This is where the table flows into another frame it will add a new header row automatically. This will eliminate the need for the extra header frames and rules. myTable.Rows[0].Type = "Header"; I also added some code to "skip" a line at the top of the Table_header rule that is commented out. You can use it on some conditional logic. myTable.Rows[0].Type = "Skip"; Hope that helps. Jon Table_Samplex2.zip
-
Scott, Here is a collect with a couple different options for you. I added an Overflow page and you can set your table frame to overflow into the overflow page text frame. I don't know of a way to have one overflow page with 3 different frames you can overflow into. I know others might know. I created a page 3 with you table rules and then others with a Header specified. I put a some text telling you which is which so you could see the difference. I hope this helps. If anyone knows how to use an Overflow page with multiple text frames that need to stay in separate text flows, please post. I would like to know how to do that also. Like this case, 3 different tables in 3 different text frames overflowing into 3 different text frames on the overflow page. Jon New folder.zip
-
// Use TextMeasure to get the length of each company name var tm = new FusionProTextMeasure; var frameWidth = 2.25; // set width of the text box (in inches) tm.pointSize = "10 pt"; // set the type size tm.font = "Helvetica"; // set your typeface var str = Field("Title"); // set the field to use tm.CalculateTextExtent(str); tm.useTags = false; var tmWidth = tm.textWidth; var tmNumberofLines = tm.textLines; return tmNumberofLines;
-
OnRecordStart rule to preview all pages but print only one
jwhittaker replied to AFitz's topic in The JavaScript Library
Afritz, You need to make all your pages unused and then change your OnRecordStart rule to this: //access the "isOnlinePreview" property and the "isPreview" property Graphic onlinePreviewVal = FusionPro.Composition.JobOptions.IsOnlinePreview; if (onlinePreviewVal=="Yes") { for (i=1; i<=20; i++) { FusionPro.Composition.SetBodyPageUsage(i, true); } FusionPro.Composition.SetBodyPageUsage("Rep", true); } else { FusionPro.Composition.SetBodyPageUsage("RepLabel", true); } Jon -
D Miller You could try something like this? I know there is a more efficient way but this should still work. if (Len(Field("Email")) >= 32) { var emailarray = Field("Email").split("@"); return emailarray[0] + '<p>' + "@" + emailarray[1]; } else return Field("Email");
-
MacFan55, You need to change these 2 lines of code. You are changing both of the fields to lowercase but you are looking for uppercase letters. This is why you are not getting any pages to show. if (ToLower(Field("accountmanager")) == "ed") else if (ToLower(Field("Accountmanager")) == "jasper")
-
Creating a Name variable consisting of multiple fields
jwhittaker replied to Dmiller35's topic in The JavaScript Library
You can use the append function. http://forums.pti.com/showthread.php?t=2056&highlight=append -
ReminderVDP, If you only want to move a frame you have to find it and then you can get the .x or the .y and subtract or add the amount you want to move. The measurements are in 100th of a point. You still need it in your OnRecordStart rule. You can try this: if (Field("AgentCoverPic").indexOf("IC")); FindGraphicFrame("FC-AgentPhoto").x = FindGraphicFrame("FC-AgentPhoto").x - (.375*7200); //The measurements are in 100th of a point Jon
-
CreateResource with incomplete name
jwhittaker replied to Der Frank's topic in FusionPro® VDP Creator
Frank You could do something like this: var filename = Field("name") + Field("timestamp") + ".jpg"; return CreateResource(filename, "graphic", true); Jon -
FPRepeatableComponent and textwrap
jwhittaker replied to jimmyhartington's topic in FusionPro® VDP Creator
Hey Jimmy Have you thought about using tabs instead of all the separate frames to control the runaround? I think this will be a better solution. Jon -
Ampersand doesn't work when changing to uppercase
jwhittaker replied to dml1280's topic in Formatting Text
I don't know WebCRD but you might need to convert the uppercase & to lowercase & if (Field("Title Line 1") == "") return ""; else return ReplaceSubstring(('<uppercase>'+Field("Title Line 1")+'</uppercase>'), "&", "&"); -
Can you try this returnStr = ''; if(FusionPro.Composition.isPreview == true || FusionPro.inValidation == true) { Rule("OnJobStart"); } numRecsExtDF = externalDF.recordCount; for (recordWalker=1; recordWalker <= numRecsExtDF; recordWalker++) { if (ReplaceSubstring(externalDF.GetFieldValue(recordWalker, 'Facility'), "&", "&") == Field("Facility")) { returnStr += (ReplaceSubstring(externalDF.GetFieldValue(recordWalker, 'Facility'), "&", "&"); } } return returnStr;
-
Baseline shifting depending on number of lines
jwhittaker replied to jmerrick0657's topic in Issues, Questions, Etc.
Jake Have to tried to increase the height of the text box? I have seen this when there isn't extra room when there is bottom or center justification turned on. Jon -
Conditional visibility with cascading drown down UI rules
jwhittaker replied to CCS_Printing's topic in MarcomCentral®
You could try using iforms to populate all the different options. I believe this is a feature you have to get Marcom to turn on. When you ask for them to turn it on, have them send you the documentation on how to do it. -
You will have your printing item on the background and the nonprinting item as a separate resource and make a rule to assign it to a graphic box the size of your document. You can name the graphic box "nonprinting". Create an OnRecordStart rule to suppress the nonprinting box when it's printing or show it when its a preview. //OnRecordStart //access the “isOnlinePreview” property and the “isPreview” property onlinePreviewVal = FusionPro.Composition.JobOptions.isOnlinePreview; desktopPreviewVal = FusionPro.Composition.isPreview; //if this is a preview composition or a desktop preview //then return the text “PROOF” if (onlinePreviewVal == "Yes" || desktopPreviewVal == true) FindGraphicFrame("nonprinting").suppress = false; else FindGraphicFrame("nonprinting").suppress = true;
-
you can look into repeat records. try starting with this. FusionPro.Composition.repeatRecordCount = 100;
-
Susan This should work for you: if(FusionPro.Composition.isPreview == true || FusionPro.inValidation == true) { Rule("OnJobStart"); } //Get a count of the total number of records in the external data file numRecsExtDF = externalDF.recordCount; /*============================================================================= || Create arrays to hold values that match the CID of the client's record ||=============================================================================*/ var clientMatch = []; var duedateMatch = []; var descriptionMatch = []; var chargeMatch = []; var creditMatch = []; // Step through the external data file and push matches into their respective variables if there is a match for (var i=1; i <= numRecsExtDF; i++) { if (externalDF.GetFieldValue(i, 'ContractNumberFormat') == Field("ContractNumberFormat")){ clientMatch.push(externalDF.GetFieldValue(i, 'ContractNumberFormat')); duedateMatch.push(externalDF.GetFieldValue(i, 'duedate')); descriptionMatch.push(externalDF.GetFieldValue(i, 'transactioncodedescription')); chargeMatch.push(externalDF.GetFieldValue(i, 'charge')); creditMatch.push(externalDF.GetFieldValue(i, 'credit')); } } /*============================================================================= || Create the table ||=============================================================================*/ new FPTable; var myTable = new FPTable; myTable.AddColumns(6600, 27200, 10200,7400) myTable.AddRows(1); myTable.Rows[0].Type = "Header"; myTable.Rows[0].Cells[0].Font = "Arial SF MT"; myTable.Rows[0].Cells[0].PointSize = "9"; myTable.Rows[0].Cells[0].TextColor = "Black"; myTable.Rows[0].Cells[0].Margins = new FPTableMargins; myTable.Rows[0].Cells[0].Margins.Top = 5; myTable.Rows[0].Cells[0].Margins.Bottom = 5; myTable.Rows[0].Cells[0].Margins.Right = 200; myTable.Rows[0].Cells[0].Margins.Left = 200; myTable.Rows[0].Cells[0].HAlign = "Left"; myTable.Rows[0].Cells[1].HAlign = "Left"; myTable.Rows[0].Cells[2].HAlign = "Right"; myTable.Rows[0].Cells[3].HAlign = "Right"; myTable.Rows[0].SetContents(duedateMatch[0], descriptionMatch[0], chargeMatch[0], creditMatch[0]); // interate through the length of the arrays (data matches from external data file) and create rows for (var k=0; k<=clientMatch.length-1; k++) { // TABLE CONTENT FORMATTING myTable.AddRows(1); myTable.Rows[k].Cells[0].Font = "Arial SF MT"; myTable.Rows[k].Cells[0].PointSize = "9"; myTable.Rows[k].Cells[0].TextColor = "Black"; myTable.Rows[k].Cells[0].Margins = new FPTableMargins; myTable.Rows[k].Cells[0].Margins.Top = 5; myTable.Rows[k].Cells[0].Margins.Bottom = 5; myTable.Rows[k].Cells[0].Margins.Right = 200; myTable.Rows[k].Cells[0].Margins.Left = 200; myTable.Rows[k].CopyCells(0,1,2,3); // Apply the same formating to each cell in this row // CREATE CONTENT FOR EXTERNAL DATA FILE RECORDS myTable.Rows[k].Cells[0].HAlign = "Left"; myTable.Rows[k].Cells[1].HAlign = "Left"; myTable.Rows[k].Cells[2].HAlign = "Right"; myTable.Rows[k].Cells[3].HAlign = "Right"; myTable.Rows[k].SetContents(duedateMatch[k], descriptionMatch[k], chargeMatch[k], creditMatch[k]); } return myTable.MakeTags();
-
return ReplaceSubstring(Field("string"),'texttoreplace', 'replacementtext');
-
How to hide a field in Marcom based on a selection
jwhittaker replied to Armando Pena's topic in MarcomCentral®
Armando You need to go to the "UI Rules" tab in the template setup in Marcom and Select the Conditional Visibility from the drop down and click on the add a rule instance. Select the field with the drop down for having an address or not. You should be able to see your different options from your address or not and select the option for no address and click on the hide these fields radial button and select the address fields to hide. Jon -
Redirecting to different folders in the Catalog
jwhittaker replied to mjlongo's topic in MarcomCentral®
Try this: In the folder custom content for the page you want redirected put this code: <meta http-equiv="refresh" content="0; URL='https://marcomcentral.app.pti.com/company/corporatestore/catalog.aspx?uigroup_id=14765#&&/wEXBAUMSXRlbXNQZXJQYWdlBQIxMgULQ2F0YWxvZ1ZpZXcFATEFD1BhZ2VOdW1iZXJJbmRleAUBMAUIUGFnZU5vZGUFBzIxNDQyODYX9VKoiisQ2HtXuykAs6q9mgVqAg=='" /> If you go the the page you want the other folders to go to and inspect the page, you will get the address and replace your page address with what is bold in the code I provided. -
Jeff I'm not a Javascript guru like some of the people on here, but his should work. Name your pages p1 - p8 and make them unused. //OnRecordStart //access the “isOnlinePreview” property and the “isPreview” property onlinePreviewVal = FusionPro.Composition.JobOptions.isOnlinePreview; desktopPreviewVal = FusionPro.Composition.isPreview; //if this is a preview composition or a desktop preview if (onlinePreviewVal == "Yes" || desktopPreviewVal == true) { FusionPro.Composition.SetBodyPageUsage(“p1”, true); FusionPro.Composition.SetBodyPageUsage(“p2”, true); } else { FusionPro.Composition.SetBodyPageUsage(“p1”, true); FusionPro.Composition.SetBodyPageUsage(“p2”, true); FusionPro.Composition.SetBodyPageUsage(“p3”, true); FusionPro.Composition.SetBodyPageUsage(“p4”, true); FusionPro.Composition.SetBodyPageUsage(“p5”, true); FusionPro.Composition.SetBodyPageUsage(“p6”, true); FusionPro.Composition.SetBodyPageUsage(“p7”, true); FusionPro.Composition.SetBodyPageUsage(“p8”, true); }
-
Load external images within a Marcom template
jwhittaker replied to jimmyhartington's topic in MarcomCentral®
Jimmy I have the same issue. We have a client that has hundreds of images and they update some of them almost monthly. They are using TPA also. I was told you can't pull from an outside server from TPAs. I do have another product that is not using TPAs and pulls images from an outside webserver. I changed my code to your info so you can try the code like this and see if it works. return CreateResource("https://files.skabertrang.dk/jh/marcom-image-test/" + Field("billedefil") + ".jpg","graphic",true); -
Setting Budgets for a Group (Sharing a Budget)
jwhittaker replied to David Miller's topic in MarcomCentral®
David Did you ever get a solution on this? I have someone that wants to do the same thing. Jon