cancel
Showing results for 
Search instead for 
Did you mean: 

SOQL IN String Literals

aakumar
New Contributor III
Snap: Salesforce SOQL
If I hard code it, it works. 

SELECT ConversionRate, CreatedById, CreatedDate, Id, IsoCode, LastModifiedById, LastModifiedDate, NextStartDate, StartDate, SystemModstamp FROM DatedConversionRate 

   where IsoCode in('AUD','CAD','EUR')
 
But If I pass the IsoCode values in a variable it does not work. What am I doing wrong here? Please see the screen shots attached.
 
1 REPLY 1

Aleksandar_A
Contributor III

You can try with enabling the expression evaluation, and with the following expression:

 

"SELECT ConversionRate, CreatedById, CreatedDate, Id, IsoCode, LastModifiedById, LastModifiedDate, NextStartDate, StartDate, SystemModstamp FROM DatedConversionRate 
where IsoCode in("+$currencyCodes+")"