I'm trying to do a table export based on specific criteria, and the only tools I have at my disposal are Data Loader and Workbench.
If I were to do this with SQL I would do:
SELECT
Id,CreatedById,CreatedDate,IsDeleted,LastActivityDate,LastModifiedById,LastModifiedDate,LastViewedDate,Name,SF__Applicant__c,SF__Job__c,SF__Status__c
FROM SF__Application__c
WHERE (CreatedDate > 2019-04-01T00:00:00.000Z
OR LastModifiedDate > 2019-04-01T00:00:00.000Z)
AND SF__Job__c IN (SELECT Id FROM SF__Job__c WHERE ownerId IN (SELECT Id FROM User WHERE Country IN ('CountryA','CountryB')))
I have looked for other examples/alternatives and I see the use of apex being the frequent suggestion. Something like:
List<SF__Job__c > JobList = [SELECT Id FROM SF__Job__c WHERE ownerId IN (SELECT Id FROM User WHERE Country IN ('CountryA','CountryB'))];
List<SF__Application__c> applist = [SELECT
Id,CreatedById,CreatedDate,IsDeleted,LastActivityDate,LastModifiedById,LastModifiedDate,LastViewedDate,Name,SF__Applicant__c,SF__Job__c,SF__Status__c
FROM SF__Application__c
WHERE (CreatedDate > 2019-04-01T00:00:00.000Z
OR LastModifiedDate > 2019-04-01T00:00:00.000Z)
AND SF__Job__c IN :JobList];
But as far as I can tell, I have no way to export using this method, like to do with SOQL Query in Workbench, or Export from data loader.
Any help anyone can provide is greatly appreciated!