#1
|
|||
|
|||
![]()
Hello, can anyone please help with this? I want a field value to appear within quoted literal text. Here is the current rule.
switch (Field("BackCTA").toLowerCase()) case "backCTA.txt".toLowerCase(): return Field("First Name")+ ", Can you believe it's been months already?"; This works just fine as is. Problem is, I want to add the field from the data named "months" so that the final line reads. case "backCTA.txt".toLowerCase(): return Field("First Name")+ ", Can you believe it's been MONTH FIELD months already?"; |
#2
|
|||
|
|||
![]()
Maybe I'm missing a complicating factor here, but could you not just do this...
case "backCTA.txt".toLowerCase(): return Field("First Name")+ ", Can you believe it's been " + Field("MONTH") + " months already?";
__________________
Michelle Digital Services Coordinator at Rileys (print and electronic services provider) in Alberta, Canada FusionPro VDP 9.1.0, Windows 7, Acrobat Pro XI , InDesign CS6, Avanti eAccess, EFI Digital Storefront |
#3
|
|||
|
|||
![]()
Yes, that worked perfectly. Thank you!
![]() |
#4
|
||||
|
||||
![]() Code:
case "backcta.txt": return Field("First Name") + ", Can you believe it's been " + Field("Month") + " months already?"; Code:
case "backcta.txt": var months = Trim(Field("Month")) + " month"; months += /^(1|one) month$/i.test(months) ? "" : "s"; return Field("First Name")+ ", Can you believe it's been " + months + " already?";
__________________
Ste Pennell FusionPro VDP Creator 9.3.15 Adobe Acrobat X 10.1.1 Mac OS X 10.12 |
#5
|
|||
|
|||
![]()
Awesome, I like it! Thank you!
|
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|