Using the "Like" Operator in the Salesforce Connector 


In this Article
Related Articles

Using the Like Operator

If you would like to use the "Like" operator in your Salesforce Connector to find similar or closely matched records to what a user has submitted in a form, you can do so.

In general, the "Like" operator should be used with the "Formula or Text" field and that formula should be equal to a field alias from your form. Additionally, you will need to add an extra percent sign around your field alias for the "Like" operator to function more like a wildcard lookup:

Provided you have used 3 percent signs surrounding your alias (as shown in the image above), the "Like" operator will find any value that contains the value entered in the form response. 

For example, if tfa_1 is your first name field (as shown in the image above), and you had a first name stored in Salesforce as "Michael", a form response of "Mich" would match with "Michael".  

However, a form response of "Michaels" would not match, because it has additional characters that are not stored in Salesforce. 

In addition to the %%%tfa_1%%% format, you can also use the %{!tfa_1}% format to accomplish the same functionality. 

Note: When using the "Like" operator, if you are running into issues where blank form fields are causing records to update, we recommend using a skip-if formula to skip your connector step if certain fields are left blank. 

Referencing a Query Parameter with the Like Operator

If you are using the Salesforce Prefill Connector, you must define a query parameter. If you want to reference that query parameter using the "Like" operator, there are several additional considerations to keep in mind.

Using the "Like" operator in a situation like this can be beneficial because you can still use wildcard lookups (as discussed above) to broaden the search in your lookup:

In general, the query parameter you define in the Prefill Connector must only use letters, and cannot use any numbers or special characters. Because of this, you cannot add % signs around the query parameter, like you can when referencing field aliases as discussed above.

Therefore, to reference a query parameter using the "Like" operator, your prefilling link will need to use URL encoding to add percent into the prefilling link.

For example, if you had a setup similar to the image above where you were looking up the "Account Number" field with the query parameter "acctnum" you could set your prefilling link up like this:

tfaforms.net/FORM_ID?acctnum=%25%%tfa_1%%%25

This would be used to trigger the prefill connector through a redirect link, where the tfa_1 field in the initial form would be equal to the account number you wanted to use for the lookup.

By adding on the %25's around the %%tfa_1%% alias, you are encoding the wildcard % signs into the URL so that the "Like" operator will function as expected. If you only wanted to add the wildcard % sign to the beginning or end of the query, then you could remove whichever %25 is no longer needed.

If you were sending out your prefilling link through a Salesforce email template, then you would need to replace the %%tfa_1%% in the link above with your Salesforce merge label:

tfaforms.net/FORM_ID?acctnum=%25{!Account.AccountNumber}%25

If you have difficulty creating your setup with the "Like" operator, please do not hesitate to contact our support team - we will be happy to assist you!

Terms of Service · Privacy Policy