function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dosomethingdosomething 

get view of all campaign members in campaign X or campaign Y?

WHAT: I would like to set up a system where I can get a view of all contacts in campaign X or campaign Y, but not in campaign Z.

 

WHY: My mass emailing application, which is integrated with SF, requires that I create mailing lists from campaigns.  I need a view so that I can easily create a new campaign from this new list of contacts, and then create a mailing list from that new campaign.

 

PROBLEM: It seems views do not support lookup by multiple campaigns, and by the looks of the idea exchange section, that may not happen for awhile.

 

HOW: I thought up one solution...

 

1. Add a text field to the contact record

2. Create a trigger that appends the campaign name to that text field when the contact is added to that campaign.

3. Add another trigger that removes the campaign name from the text field

4. Create a view that searches the text field for the campaign names I want and used advanced views to do the filtering

 

Does that seem reasonable to the Apex developer community?  How could I achieve steps 2 and 3?  Or, am I missing some obvious solution that exists out there that allows me to do this filtering and create a new campaign from the resulting contacts?

 

I have no experience coding Apex and would appreciate anyone who can lend some advice or point me in the right direction.

 

Thanks!

 

Rob

mikefmikef

Rob:

 

I think you can get what you want from a report.

 

Is you run a campaign report with Contacts you can filter on the campaign name and use a comma to add as many campaigns to the list.

 

Make sure the report's main filter is 'All Active Campaigns'. Then add a filter on the campaign name, like Campaign Name equals X,Y.

The comma in between X and Y acts like an OR statement. 

 

Then you have your list and you can click the add to campaign button to create your new campaign for the email program.

 

Hope this helps.

dosomethingdosomething

Hey mikef,

 

Thanks for your reply!  I played with reports and your solution works for getting contacts who appear in campaign X or Y.

 

I was not able to get it to filter out contacts from a specified campaign. 

 

Do you know how to see contacts who appear in (X or Y) AND (not in Z) ?

 

Thanks again,

 

rob

mikefmikef

So you have Campaign Name equals X,Y

and then another line for Campaign Name Not Equal Z

 

I think that will work.

dosomethingdosomething

Hmm I could not get it to work.

 

Summarized by Contact ID, Filtered by Campaign Name  (see photo below)

 

Thoughts?

 

 

Campaign Contacts report

 

 

mikefmikef

yep as soon as I posted my reply I thought about it and it's not going to work.

 

I think the only way is to put both lists in Excel and vlookup to remove the people in both lists.

dosomethingdosomething

No problem, I appreciate the effort

 

Can anyone help point me in the direction of creating triggers that would modify a custom text field stored in the contact record?