Sample for Candidate Presentation: Difference between revisions

From 3B Knowledge
Jump to navigation Jump to search
(Finished first section)
(Image update)
Line 7: Line 7:
==== Creating SOQL Filter ====
==== Creating SOQL Filter ====
To do this, first click on the repeatable section within the document. This will show the SOQL input at the bottom:
To do this, first click on the repeatable section within the document. This will show the SOQL input at the bottom:
[[File:Screenshot 2023-12-06 at 11.53.08.png|left|thumb|642x642px|SOQL Query Input]]


[[File:Screenshot 2023-12-06 at 11.53.08.png|thumb|642x642px|SOQL Query Input|none]]




Line 24: Line 18:
Id IN ({params.education-filter})
Id IN ({params.education-filter})
</syntaxhighlight>
</syntaxhighlight>
[[File:Screenshot 2023-12-06 at 11.50.07.png|left|thumb|658x658px|SOQL Query Repeatable Section]]
[[File:Screenshot 2023-12-06 at 11.50.07.png|thumb|658x658px|SOQL Query Repeatable Section|none]]
 
 
 
 
 
 
 
 




Line 38: Line 24:


==== Adding URL Parameters Manually ====
==== Adding URL Parameters Manually ====
The filter described above can be added to a document url manually like this:<syntaxhighlight>
The filter described above can be added to a document url manually like this:<syntaxhighlight>
&education-filter='123exampleId','456exampleId'
&education-filter='123exampleId','456exampleId'
</syntaxhighlight>
</syntaxhighlight>


 
Which will result in the custom SOQL query looking like this (in the background):<syntaxhighlight>
This will result in the custom SOQL query looking like this:<syntaxhighlight>
Id IN ('123exampleId','456exampleId')
Id IN ('123exampleId','456exampleId')
</syntaxhighlight>
</syntaxhighlight>


 
When the document is loaded, the repeatable section will now only show records that have Id's contained within the custom SOQL query.
On the generated document, the repeatable section will now only show records that have Id's contained within the custom SOQL query.

Revision as of 06:37, 6 December 2023

Introduction

This article is only a sample on how to achieve custom filtering within 3B Documents.

SOQL Filtering Using URL Parameters

3B Documents allows you to filter child repeatable sections by adding an SOQL query to the chosen section.

Creating SOQL Filter

To do this, first click on the repeatable section within the document. This will show the SOQL input at the bottom:

SOQL Query Input


Start the SOQL query with the field you want to filter by (in this case 'Id'). Use the 'IN' keyword then within brackets add the following:

{params.example-filter}

Choose a suitable name for the filter (something related to the repeatable section) The final query should look similar to this:

Id IN ({params.education-filter})
SOQL Query Repeatable Section


Make sure to click the save icon next the query input, and also save the document.

Adding URL Parameters Manually

The filter described above can be added to a document url manually like this:

&education-filter='123exampleId','456exampleId'

Which will result in the custom SOQL query looking like this (in the background):

Id IN ('123exampleId','456exampleId')

When the document is loaded, the repeatable section will now only show records that have Id's contained within the custom SOQL query.