Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-01-2017, 01:12 PM
aronfromct aronfromct is offline Mac OS X Office for Mac 2011
Novice
 
Join Date: May 2017
Posts: 4
aronfromct is on a distinguished road
Cool “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
Reply With Quote
  #2  
Old 05-01-2017, 04:11 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 05-01-2017, 04:22 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #4  
Old 05-04-2017, 07:56 PM
aronfromct aronfromct is offline Mac OS X Office for Mac 2011
Novice
 
Join Date: May 2017
Posts: 4
aronfromct is on a distinguished road
Default

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!
Reply With Quote
  #5  
Old 05-04-2017, 08:25 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Neither of the field constructions represented in your post match the field construction I said was required...
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 05-05-2017, 07:39 PM
aronfromct aronfromct is offline Mac OS X Office for Mac 2011
Novice
 
Join Date: May 2017
Posts: 4
aronfromct is on a distinguished road
Default

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.
Reply With Quote
  #7  
Old 05-07-2017, 04:47 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #8  
Old 05-16-2017, 05:39 AM
aronfromct aronfromct is offline Mac OS X Office for Mac 2011
Novice
 
Join Date: May 2017
Posts: 4
aronfromct is on a distinguished road
Default

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.
Reply With Quote
Reply



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

Other Forums: Access Forums

All times are GMT -7. The time now is 06:39 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft