Jump to content

indumglynndevins.com

Members
  • Posts

    15
  • Joined

Posts posted by indumglynndevins.com

  1. I'm trying to format a date that would work with Marcom calendar option where the user would pick a From date (Month, day), and To date (day, year). So basically it would print as September 9-15, 2018 (it's event invitation they could reuse just change dates as needed). From other posts, I can format first part of it, but I'm stuck on '-15, 2018'. Anyone have ideas how I can code this? I have 2 input fields FromDate and ToDate.

     

    Thank you,

  2. Hi,

     

    How can I make this calendar work for additional years (2019, 2020, 2021...etc)? NOt sure if i need additional coding or it's something I can do on Marcom side. Right now if user was to pick Month 'January' and Year '2019' from the dropdown list it pulls January 2018 image/resource and days of the week don't match up so the information they are typing in is not populating in the correct day of the week. Month and Year fields are set up as text drop down library. I attached the files for reference. Any help is appreciated.

     

    Thank you,

    GD-23123-1_Jun-14-2018_07-04-56.zip

  3. That being said, you can certainly simplify things. You consolidate your two "header" rules into one:

    var XDF = new ExternalDataFileEx("PostcardContent.txt", "\t");
    return XDF.GetFieldValue(XDF.FindRecord(0, Field('Header')), 1) || Field('HeaderCustom');
    

     

     

    OK got stuck with this lol...Is it possible to add a replace substring to the code above? I know how to do this as two separate rules, but can it be done as one to simplify code further?

    This is what I have for HeaderReplace rule...

     

    var s = Rule("Rule Header");

     

    s = ReplaceSubstring(s, "[COMMUNITY NAME]", Field("Community Name"));

    s = ReplaceSubstring(s, "[RSVP]", Field("RSVPPhone"));

    return s;

  4. Hi,

     

    I'm trying to figure out if there is an easier way to accomplish what we are doing. Example...we are working on Memorial Day postcard and there is a data field Header and we also offer HeaderCustom field (in case user doesn't want to use our pre-written copy they can add their own). Then we have Copy and CopyCustom and so on. On Marcom Side this needs to be a drop down for user to either pick our copy or Custom. Right now we are using .txt file and uploading to MarcomCentral and creating drop down list with the value to pull from that XDF file... the rule looks something like this...

     

     

    Header = "";

     

    var XDF = new ExternalDataFileEx("PostcardContent.txt", "\t");

     

    for (i = 1; i < XDF.recordCount+1; i++)

    {

    Option = XDF.GetFieldValue(i, 0);

     

    {

    if (Field("Header") == Option)

     

    {

    Header = XDF.GetFieldValue(i, 1);

    }

    }

     

    }

     

    return Header;

     

     

    and...

     

    var var1 = Rule("Rule HeaderContent");

    var var2 = Field("HeaderCustom");

     

     

    if (var1=="") {

    var1 = var2;

    } else {

    var1 = var1;

    }

     

    return var1;

     

     

    Is this the best practice for what we are doing or is there another way this can be done without XDF file maybe? Thank you,

  5. Thanks for posting the template.

     

     

    Anyway, I'm still not sure what this has to do with your original question about "two fonts." Where do you want two different fonts applied as part of this?

     

    Hey Dan,

     

    Thanks for that [Community Name] explanation...very helpful! Reason we add value this way is so the user can put the name of their Community Name inside our provided copy. This is a variable template not specific to any community. Hope i'm explaining it right.

     

    Now, the font in the header 'Join us for' (first line) and second line 'CINCO DE MAYO' are two different fonts. When I add text to the text editor and select those two lines and insert <header> it changes both of those lines of text to the first font :/.

     

    Thanks,

  6. I don't think you need any JavaScript code to accomplish this. Just set the text with the data field name in the Text Editor, and set the fonts to whatever you want.

     

    http://forums.pti.com/attachment.php?attachmentid=1810&stc=1&d=1522083702

     

    Hey Dan,

     

    So, when I set the fonts and change the data field to <header> it changes the font to the first font (top line)- see attached. This is all one field (header). This should also work as a custom field where user can change the copy if they would like. Is there a way to make it work like this without making it two separate data fields?

     

    Thank you, :confused:

    Untitled-2.png.69b28cf7eb0fc76a8e3e485b8f568057.png

    Untitled-3.png.36234a310bcd56200cd783993d00a3f2.png

  7. I will say, a majority of the solutions you will find are a lot easier than you think. I would say 75%, I, myself, overthink the problems, and then find a very simple solution to the problem. Just letting you know, you are not alone.

     

    Thanks Scotts! It's good to know I'm not alone in this and to have a great support as this forum along the way :):)

  8. Hi,

     

    New here and to Marcom/Javascript/Fusion Pro so figured to reach out for some help.

    Working on a postcard and the field EventHeader has 2 fonts and a variable spot to enter [Community Name] (I attached the image).

     

    So, on Marcom side it would be pre filled field and user can change the Community Name. Not sure what the code looks like to return 2 fonts and for it to be a custom field. Any help is appreciated.

     

    Thanks, :confused:

    Untitled-2.png.6bc835f1b195bef61a8564a98dc83f71.png

×
×
  • Create New...