Jump to content

dml1280

Registered Users - Approved
  • Posts

    25
  • Joined

Converted

  • FusionPro Products
    No

dml1280's Achievements

Explorer

Explorer (4/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later

Recent Badges

10

Reputation

  1. I have an external data field to pull addresses and phone numbers. We don't have fax numbers for every location. Is there a way to suppress the line if the fax number is blank in the external data field? Here is the code I am using: returnStr = ''; if(FusionPro.Composition.isPreview == true || FusionPro.inValidation == true) { Rule("OnJobStart"); } numRecsExtDF = externalDF.recordCount; for (recordWalker=1; recordWalker <= numRecsExtDF; recordWalker++) { if (TaggedTextFromRaw(externalDF.GetFieldValue(recordWalker, 'Facility')) == UntaggedDataField("Facility")) { returnStr += "F:"+externalDF.GetFieldValue(recordWalker, 'Fax Label'); returnStr += " "+externalDF.GetFieldValue(recordWalker, 'Fax'); } } return returnStr; "Suppress if Empty" in the text box doesn't work here because there is text (The "F:"). So I need to suppress the "F:" if there is no fax number in the external data field. Thank you.
  2. I added it here } Pic.width = Width; Pic.height = Height; Pic.ChangeColor("ALL", "0, 0, 0, 60", 10); // Change all colors. if (Pic.exists) return Pic; But it had no effect. Also, is there a way to add a little padding above the inline image so it lines up better with the text? Thank you so much for your help.
  3. Is there a color change rule to change the color of an inline graphic? Or it only works on a pdf brought in with a graphic box? This is the code I am using for the inline graphic... // Rule converted from XML Template "Inline Graphic Rule: Community Name": // Begin XML Template selections // var FieldName = "Social Media Icons"; // "Choose the field containing the graphic name:" (Required): FieldList var Format = "pdf"; // "Choose the type of graphic:" (Required): PickList ["jpg" (JPG or JPEG), "tif" (TIF or TIFF), "png" (PNG), "pdf" (PDF), "gif" (GIF), "eps" (EPS)] var SearchPath = ""; // "Enter a search path:": FolderPath var DefaultGraphic = "Social Media - White .1875"; // "Choose a default graphic:": ResourceList (Graphic) var SkipIfNoValue = false; // "Skip if the field value is empty": CheckBox var Width = HundredthsOfPointsFromText("0 in"); // "Override graphic width (zero to use existing width):": Space var Height = HundredthsOfPointsFromText(".16 in"); // "Override graphic height (zero to use existing height):": Space // End XML Template selections // var fieldVal = Field(FieldName); if (!fieldVal && SkipIfNoValue) return ""; var path = CombinePath(SearchPath, fieldVal); var Pic = NullResource(); for (var pass = 1; ; pass++) { switch (pass) { case 1: var validExtensions = [".png", ".pdf", ".gif", ".eps", ".tif", ".tiff", ".jpg", ".jpeg"]; if (validExtensions.indexOf(GetFileExtension(path).toLowerCase()) >= 0) Pic = CreateResource(path, "graphic", true); break; case 2: Pic = CreateResource(ReplaceFileExtension(path, Format.toLowerCase()), "graphic", true); break; case 3: var altExtensions = { JPG: "jpeg", TIF: "tiff" }; Pic = CreateResource(ReplaceFileExtension(path, altExtensions[Format.toUpperCase()]), "graphic", true); break; case 4: //Print("Graphic not found: " + fieldVal); if (!DefaultGraphic) return ""; //else Pic = Resource(DefaultGraphic); default: return ""; // should never get here } Pic.width = Width; Pic.height = Height; if (Pic.exists) return Pic; } return ""; // should never get here Thanks.
  4. Follow up question...this works great for almost all entries. It doesn't work if my facility name has an apostrophe or an ampersand in it. Is there a way to be able to include the apostrophe or an ampersand in the facility name? Sometimes I will need to use the facility name as a field that will be filled in as well. Thank you
  5. Thank you. It works perfectly. I am using the URL for our store image library in MarcomCentral as the search path. Is there any issue that you can for-see with that?
  6. I have been using this rule to pull address information into a text box based on the Facility field. It works great. returnStr = ''; if(FusionPro.Composition.isPreview == true || FusionPro.inValidation == true) { Rule("OnJobStart"); } numRecsExtDF = externalDF.recordCount; for (recordWalker=1; recordWalker <= numRecsExtDF; recordWalker++) { if (TaggedTextFromRaw(externalDF.GetFieldValue(recordWalker, 'Facility')) == TaggedDataField("Facility")) { returnStr += externalDF.GetFieldValue(recordWalker, 'City') + ", "; returnStr += externalDF.GetFieldValue(recordWalker, 'State') + " "; returnStr += externalDF.GetFieldValue(recordWalker, 'Zip'); } } return returnStr; With this code, when a new location is brought on, I am able to just add a new facility to the library drop down in MarcomCentral and add a line in my external database file and now all products that use this code will automatically have the new location added without having to update individual products. I want to add a field for the facility logos but I can't figure out how to have it called back. Can a graphic be called in using an external database file? I have all of the logos saved in libraries to use across multiple products. Any insight would be appreciated. Thank you.
  7. Sometimes I have a hard time realizing where a FusionPro issue ends and where a MarcomCentral issue starts. Either way...the UntaggedDataField code worked! I really appreciate all your back and forth with me. Thank you again.
  8. This fix worked in FusionPro. I am not familiar with WebCRD...sorry. return '<uppercase>' + TaggedDataField("Title Line 1") + '</uppercase>';
  9. No, I still can't get it to work. I also checked in MarcomCentral to make sure I have the file linked correctly and that the drop down list is exact. I even tested the settings by changing one of the facilities on the drop down to use "and" instead of "&" and it worked...so it's definitely the tagged text. Did you see the file I attached? Did I place the code correctly? Otherwise I will just have to bite the bullet and forget about using the "&" and hopefully I won't run into consistency issues. Thanks, Dena
  10. I am sorry, I thought I had sent the files previously. Attached here. I also included in the package the screenshots I tried to post. It shows that the code works in FusionPro but doesn't work once up on MarcomCentral. Archive.zip Thank you so much.
  11. Thanks but that didn't work. It shows up fine in FusionPro but not in MarcomCentral. It's not pulling the address and website. returnStr = ''; if(FusionPro.Composition.isPreview == true || FusionPro.inValidation == true) { Rule("OnJobStart"); } numRecsExtDF = externalDF.recordCount; for (recordWalker=1; recordWalker <= numRecsExtDF; recordWalker++) { if (externalDF.GetFieldValue(recordWalker, 'Facility') == Field("Facility")) { returnStr += TaggedTextFromRaw(externalDF.GetFieldValue(recordWalker, 'Address')); } } return returnStr;
  12. Yes, I removed all the extra code and it worked perfectly. Thanks!
  13. Oh wow, thank you so much! This is code that I have reused several times, I just copy and paste it and then choose my format. I have no idea how it got in there. I will adjust it.
  14. This is the "record walker" code. I have a separate rule for each variable I am bringing in from the external data file: returnStr = ''; if(FusionPro.Composition.isPreview == true || FusionPro.inValidation == true) { Rule("OnJobStart"); } numRecsExtDF = externalDF.recordCount; for (recordWalker=1; recordWalker <= numRecsExtDF; recordWalker++) { if (externalDF.GetFieldValue(recordWalker, 'Facility') == Field("Facility")) { returnStr += externalDF.GetFieldValue(recordWalker, 'Facility'); } } return returnStr; The facility names have "&" in them. The issue is that in Fusion Pro it pulls the record correctly. Once uploaded to MarcomCentral, the record doesn't get pulled when the facility name is selected from the dropdown. I tried adding "TaggedDataField" before "Facility" if (externalDF.GetFieldValue(recordWalker, 'Facility') == TaggedDataField("Facility")) But that didn't work. Any other ideas? Or is there somewhere else I should add the "TaggedDataField"? Thanks for your help!
  15. I am using an external data file to bring in different location addresses. The names of the locations uses an ampersand rather than "and". This is how their logos are set up and I would like to keep it all consistent. When I code the card with Fusion Pro, everything works fine and it composes correctly, but when I upload onto MarcomCentral, the list doesn't work with the ampersand. Is there a way to make it work without replacing "&" with "and"?
×
×
  • Create New...