Forum Discussion
Hi @mmussitsch,
Problem I think was in this part
I don’t think that it can be mapped though multiple elements with only one set of square brackets.
Each square bracket is for only one element. I am not sure 100% about this but I think this was the problem.
I’ve changed the functions inside expression file a little bit.
Replaced projectPath with two other functions: getProjectSpace and getProject.
"getOrgName": pipe.plexPath.split("/")[1],
"getProjectSpace": x => x.split('/')[2],
"getProject": x => x.split("/")[3],
"whereAmI": this.getOrgName.toLowerCase().contains("prod") ? "Prod" : (this.getOrgName.toLowerCase().contains("test") ? "Test" : "Dev"),
"getAccount": (path,type) => this.Accounts[this.getProjectSpace(path)][this.getProject(path)][type][this.whereAmI]
Here is the Accounts object.
"Accounts": {
"projectSpace": {
"projectName": {
"Salesforce": {
"Dev": {
"account_name": "Salesforce CIDEV"
}
}
}
}
}
And here is the output.
Hope this will help you 🙂
Regards,
Viktor
- mmussitsch4 years agoNew Contributor II
Thanks so much Viktor for the help. You’ve helped me simplify some things and build upon them. I now have a pretty comprehensive file. In addition to the other functions, I have new ones like getProjectSpace, getProject, findProject, findProjectSpace, findAreabyProject, findAreabyProjectSpace so that if an item doesn’t have a “Project” definition it will default to the Project Space definition. They all work together in one call pullObject(“Salesforce”). It’s working very well.
One quick question, your code snippet, what editor/file format is that with all the colors. Sure is nicer to read than an unknown .expr file via Notepad++.
Thanks!
Melissa- dmiller4 years agoFormer Employee
@mmussitsch Viktor is using the code format option on this site (</> from the toolbar above the text box.)
- mmussitsch4 years agoNew Contributor II
Oh okay @dmiller - thank you! Do wish Notepad++ had these helpers. But good to know next time I post code.
- amit_saroha4 years agoNew Contributor III
@viktor_n - I am sorry to hijack this thread but I have a similar situation and I am struggling to understand. I would heartily appreciate it if you can describe what you have done here and how they function you have written is working for me to understand.
My expression file is as below -
{
applications:
{
OracleEBS:
{
dev:
{
FNTS :
{
srcDB: ‘shared/Snaplogic_FNTS’,
tgtDB: ‘’
},
FNDV :
{
srcDB: ‘shared/Snaplogic_FNDV’,
tgtDB: ‘’
},
FNPJ :
{
srcDB: ‘shared/Snaplogic_FNPJ’,
tgtDB: ‘’
},
FNIG :
{
srcDB: ‘shared/Snaplogic_FNIG’,
tgtDB: ‘’
},
FNU1 :
{
srcDB: ‘shared/Snaplogic_FNU1’,
tgtDB: ‘’
},
FNU2 :
{
srcDB: ‘shared/Snaplogic_FNU2’,
tgtDB: ‘’
},
DRYR :
{
srcDB: ‘shared/Snaplogic_DRYRA’,
tgtDB: ‘’
}
},
test:
{
},
prod:
{
FNPD :
{
srcDB: ‘shared/Snaplogic_FNPD’,
tgtDB: ‘’
}
}
},
OracleCloud:
{
dev:
{
DEV1:
{
URL: ‘https://oraclecloud.com’,
Account: ‘shared/Oracle_Cloud_Dev1’,
Rest_Account: ‘shared/Oracle_Cloud_REST_Dev1’
},
DEV2:
{
URL: ‘https://oraclecloud.com’,
Account: ‘shared/Oracle_Cloud_Dev2’,
Rest_Account: ‘shared/Oracle_Cloud_REST_Dev2’
},
TEST:
{
URL: ‘https://oraclecloud.com’,
Account: ‘shared/Oracle_Cloud_Test’,
Rest_Account: ‘shared/Oracle_Cloud_REST_Test’
}
},
test:
{
},
prod:
{
PROD:
{
URL: ‘https://oraclecloud.com’,
Account: ‘shared/Oracle_Cloud_Prod’,
Rest_Account: ‘shared/Oracle_Cloud_REST_Prod’
}
}
},
HCMCloud:
{
dev:
{
DEV1:
{
URL: ‘’,
Soap_Account: ‘shared/HCM_Cloud_SOAP_Dev1’,
Rest_Account: ‘shared/HCM_Cloud_REST_Dev1’
},
DEV2:
{
URL: ‘’,
Soap_Account: ‘shared/HCM_Cloud_SOAP_Dev2’,
Rest_Account: ‘shared/HCM_Cloud_REST_Dev2’
},
TEST:
{
URL: ‘https://oraclecloud.com’,
Soap_Account: ‘shared/HCM_Cloud_SOAP_Test’,
Rest_Account: ‘shared/HCM_Cloud_REST_Test’
}
},
test:
{
},
prod:
{
PROD:
{
URL: ‘’,
Soap_Account: ‘shared/HCM_Cloud_SOAP_Prod’,
Rest_Account: ‘shared/HCM_Cloud_REST_Prod’
}
}
},
FileWriter:
{
dev:
{
GroundPlex: ‘shared/Groundplex_File_Access’
},
test:
{
},
prod:
{
GroundPlex: ‘shared/Groundplex_File_Access’
}
},
Email:
{
dev:
{
Account: ‘shared/SMTP_Mail’,
From: ‘a@b.com’,
CC: ‘a@b.com’
},
test:
{
},
prod:
{
Account: ‘shared/SMTP_Mail’,
From: ‘a@b.com’,
CC: ‘a@b.com’
}
}
},
errors: ‘shared/captureDataWarnings’,
timezoneSync: ‘US/Eastern’,
maxRetryCount: 24,
getOrgName: pipe.plexPath.split(‘/’)[1],
whereAmI: this.getOrgName.toLowerCase().contains(‘dev’) ? “dev” : (this.getOrgName.toLowerCase().contains(‘test’) ? “test” : (this.getOrgName.toLowerCase().contains(‘prod’) ? “prod” : null)),
getAppConf: x => (this.applications[this.whereAmI])
}