Team,
I would like to run the SOQL query to fetch the SFDC case information for specific cases. Currently, I am running the entire case information to compare them with my cases and filtering them based on CASE NUMBER. Is there a way to run the query only for specific cases? I have created a Cnos column that can be used in the Where condition in the SOQL query. However, I am unsure how to use this Variable or Column there in the SOQL query as there is no way to link my inputs to the Salesforce Input component. Example code below.
SELECT
Id,CaseNumber,
Opportunity_ID__c,
Opportunity_ID__r.Id,
Opportunity_ID__r.Name,
Opportunity_ID__r.Account.Name,
Opportunity_ID__r.Owner.Namefrom
Case
WHERE
CaseNumber in Cnos
Regards,
Alwin
Hi @allwynbazil
You can do it using the summarize/dynamic input tool:
1-Concatenate your field to be used inside of a IN clause:
2-replace the concatenated field inside of the dynamic input tool:
Take a look at the attached example
Hi, I have had some luck with dynamic sqls making a connector nested within a macro. You can prepare a few steps before hand to modify the sql with simple formula tools and creating an in() statement with a concatenate on a summary tool. If you provide a dataset I can show you.
Hi Felipe,
My requirement is for Salesforce Input Component. Is there a way include my concatenated column in SOQL query?
Regards,
Alwin
Hi @allwynbazil
Got you! Yes, you can do it by building a macro like this (but with the salesforce input tool on the place of the input tool):
And then using the update component to update the where clause:
Your main workflow would look like this:
Here is how to build where clauses for Salesforce SOQL
https://developer.salesforce.com/forums/?id=906F00000008ruyIAA
Thanks, Felipe. I will try and let you know. Appreciate your quick response.
Regards,
Alwin
I am sorry. I am unsure about macro and how to use it as you suggested. Can you please show me an example of the case numbers below for my query?
20515812201 |
20515721001 |
20515782901 |
20515813501 |
20594086004 |
20515815101 |
SELECT
Id,CaseNumber,
Opportunity_ID__c,
Opportunity_ID__r.Id,
Opportunity_ID__r.Name,
Opportunity_ID__r.Account.Name,
Opportunity_ID__r.Owner.Name
from
Case
WHERE
CaseNumber in Cnos
Regards,
Alwin
Hi @allwynbazil
Unfortunately i dont have Salesforce here right now to test it, but here it is what i think that would work. Download the attached workflow, enter inside the macro, log in your salesforce environment, do the bellow config, save the macro and try to run it.