#1
|
|||
|
|||
“nested” IF/Then with Mergefield, utilizing Conga and Salesforce links.
Hi,
I believe I am trying to do a “nested” IF/Then with Mergefield, utilizing Conga and Salesforce links. I am able to display images using the following. { MERGEFIELD IMAGE:Slideshow3_URL:W=250 \* MERGEFORMAT } { MERGEFIELD IMAGE:Bedroom_Generic_URL:W=250 \* MERGEFORMAT } However, I want to display one image when one criteria is met, and the other image for all other times. I have tried a few things but it doesn’t work for me. When testing, I am copying all text to the right of ‘IF’ and entering it in an If statement. If it matters, I am using Word on a Mac, though I do have access to a PC. Any ideas would be helpful...specific instructions would be great as I am a bit new to this. Test 1. If Apartment_Record_Type__c=“Third Party Unit” “IMAGE:Bedroom_Generic_URL:W=250” “IMAGE:Slideshow1_URL:W=250” Error! Unknown op code for conditional Test 2 If Apartment_Record_Type__c = “Third Party Unit” “«IMAGE:Bedroom_Generic_URL:W=250»” “«IMAGE:Slideshow1_URL:W=250»” Displays as «IMAGE:Slideshow1_URL:W=250» Test 3 IF {Apartment_Record_Type__c = “Third Party Unit” { MERGEFIELD “IMAGE:Bedroom_Generic_URL:W=250” } { MERGEFIELD “IMAGE:Slideshow1_URL:W=250” }} Displays as Mergefield. Thanks, Aron |
#2
|
||||
|
||||
At the least you'd need a field something like:
{IF{MERGEFIELD "Apartment_Record_Type__c"}= "Third Party Unit" {MERGEFIELD "IMAGE:Bedroom_Generic_URL:W=250"} {MERGEFIELD"IMAGE:Slideshow1_URL:W=250"}} where the { & } are all field braces, not typed braces.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
||||
|
||||
Cross-posted at: https://answers.microsoft.com/en-us/...f-e8b4844fd4b7
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
Hi,
I have tried two things and it doesn't work the way I would think it would. I. First try: 1. Right click and select "Toggle Field Codes." 2. Select existing text "{ MERGEFIELD IMAGE:Slideshow1_URL:W=250\* MERGEFORMAT} 3. Delete. 4. Type CTRL-F9 and then move icon to far right, type CTRL-F9, and do so a third time to generate { }{ }{ } 5. Select { }{ }{ } and type CTRL-F9 to now show { { }{ }{ } } 6. Add text to that: { IF{ Apartment_Record_Type__c }="Third Party Unit" { MERGEFIELD "IMAGE:Bedroom_Generic_URL:W=250" } { MERGEFIELD"IMAGE:Slideshow1_URL:W=250" } } This works, however, the Bedroom_Generic pic is shown, even if its Not a 3rd party unit. II. Second try: The second thing is similar but I use {{{ }{ }}{ }{ }} It shows as (spacing might not be 100% accurate) { IF{{ Apartment_Record_Type__c }{="Third Party Unit"}} { MERGEFIELD "IMAGE:Bedroom_Generic_URL:W=250" } { MERGEFIELD"IMAGE:Slideshow1_URL:W=250" } } It starts to load but at times I get "this operation was cancelled" and at times "There was an error during the merge process." At times if there were issues it would be blank where the image was, so getting an error at this stage is odd...I'll try to follow up with Conga. Thanks. I should add I am also trying to post this here, but having problems signing in...Trying to recover my password. https://answers.microsoft.com/en-us/...f-e8b4844fd4b7 Also, I did this on a PC...having problems doing this with my Mac at work. Thanks! |
#5
|
||||
|
||||
Neither of the field constructions represented in your post match the field construction I said was required...
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
I tried
{IF{MERGEFIELD "Apartment_Record_Type__c"}= "Third Party Unit" {MERGEFIELD "IMAGE:Bedroom_Generic_URL:W=250"} {MERGEFIELD"IMAGE:Slideshow1_URL:W=250"}} and its the same issue, the Bedroom_Generic pic is shown, even if its Not a 3rd party unit. Thanks. |
#7
|
||||
|
||||
Did you ensure all the spaces indicated in my post exist in your field construction? Omit any and it will likely fail in exactly the way you've described.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#8
|
|||
|
|||
Hi, I spoke to Conga support and was able to use
{IF "{MERGEFIELD _RECORDTYPE}" = "Third Party Unit" "{MERGEFIELD IMAGE:Bedroom_Generic_URL:W=250}" "{MERGEFIELD IMAGE:Slideshow1_URL:W=250}" I also had the wrong label. I was using the API name Apartment_Record_Type__c when I needed to use the Conga label of _RecordType. Thanks for your help. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
excel data from salesforce | excelstone | Excel | 1 | 11-07-2015 01:11 AM |
Printing selected pages based on a MERGEFIELD.g. If MERGEFIELD=x then print pages 1,2,4 if MERGEFIEL | Richard.p | Word | 3 | 04-21-2015 01:14 AM |
Links need to be Hot links in Bibliography in Word 2010, 2013 | synses | Word | 1 | 11-23-2013 12:48 AM |
SUM a single mergefield | kawirider88 | Mail Merge | 1 | 09-29-2013 06:37 PM |
Business Contact Manager not loading, instead it's Salesforce | RobinE | Outlook | 5 | 09-18-2012 04:35 AM |