cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Workflow Hero

Filter Component Group Based on Checkbox Field

Jump to solution

I'm trying to create a component group that populates text based on a custom text field in salesforce.

 

If an account has sub-companies listed in the custom text field, then I want them to appear on a separate line in my document with Related employers: Sub-company 1, Sub-company 2, etc.

 

I can get the above to appear, but if there are no sub-companies I want the component group to be deleted so I checked the box to delete container if empty, however my component group will not be empty because it has the words Related employer: before my field tag for the custom text field.  To get around this I wanted to add a filter to only pull the component group if the custom text field is not blank.  Since I don't see a filter option for is not blank, I thought I would create a custom checkbox formula field on the account and use that checkbox for the filter.  If the checkbox is checked (field is true) then I want the component group to populate.  If the checkbox is not checked (field is false), I don't want the component group to populate on my document.  Is this possible?

Labels: (1)
0 Kudos
Reply
9 Replies
Workflow Hero

Re: Filter Component Group Based on Checkbox Field

Jump to solution

@Jen Is it possible to just added "Related employer:" to your component group then the delete container should work fine.

Document Nerd
0 Kudos
Reply
Workflow Hero

Re: Filter Component Group Based on Checkbox Field

Jump to solution

@DocGenVinnie Like this? Related employer: <<Company_Sub_Company_Names>>

 

When I tried that it didn't work right.  If the <<Company_Sub_Company_Names>> field was blank, the component group still populated the Related employer: wording.

0 Kudos
Reply
Workflow Hero

Re: Filter Component Group Based on Checkbox Field

Jump to solution

@Jen you would also add a filter to the component that would look at 

<<Company_Sub_Company_Names>> and see if it "is blank".  In the sample below I am looking at account description. 

Filter.png

Document Nerd
0 Kudos
Reply
Workflow Hero

Re: Filter Component Group Based on Checkbox Field

Jump to solution

@DocGenVinnie Sorry I'm not following your example.

If <<Company_Sub_Company_Names>> is blank, I don't want anything to show up on my output document.

If <<Company_Sub_Company_Names>> is not blank, I want Related employer: <<Company_Sub_Company_Names>> to show up on my document.

This is what I have: and it didn't work.  My <<Company_Sub_Company_Names>> field is blank but Related employer: still populated on the output document.

Sub-Company.PNG

0 Kudos
Reply
Workflow Hero

Re: Filter Component Group Based on Checkbox Field

Jump to solution
You need to put the filter on the component vs adding it to the component group.
Document Nerd
0 Kudos
Reply
Workflow Hero

Re: Filter Component Group Based on Checkbox Field

Jump to solution

@DocGenVinnie When I do that, I get the same results.  I no longer have a filter on the component group.  I added it to the component, but when my <<Company_Sub_Company_Name>> field is blank, the Related employer: wording still populates in my output document.

If the <<Company_Sub_Company_Name>> is blank I want that and the Related employer: wording deleted.

Capture.PNGResults.PNG

0 Kudos
Reply
Workflow Hero

Re: Filter Component Group Based on Checkbox Field

Jump to solution

Anyway you can grant login access and provide your Org ID so we can take a look?

Document Nerd
0 Kudos
Reply
Workflow Hero

Re: Filter Component Group Based on Checkbox Field

Jump to solution

My logic was backward.  Looks like you are good to go now.  The operator needed to be "not equal to" and you need to reference the "<<Company_Sub_Company_Names>>" in the filter instead of the <<Account_Sub_Company_Names>>.

 

Screen Shot 2019-04-15 at 2.54.51 PM.png

Document Nerd
0 Kudos
Reply
Workflow Hero

Re: Filter Component Group Based on Checkbox Field

Jump to solution

Thanks so much for your help on this!

0 Kudos
Reply