SSIS Expression question

Hi Guys,

Need urgent help. I am using a logic in SSIS expression.

IF Parameter Value == "QA Server" ? "QA Path" : "Production Path"

It is not working as suppose to be. My question as visually, am I doing something wrong here?

Please advise.

Can you paste a screenshot?

Thank You for your reply Jotorre, Here is my code.

@[$Package::Server] == "Data Source=SANSQL1221_QA;Initial Catalog=STAGE;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;" ? " \\vfs01.sam.com\ET01\ETPro\P_Pr_Lo_MFolder\QA_Environment\PFileFolder\" : "\\vfs01.sam.com\ET01\ET01\P_Pr_Lo_MFolder\Prod_Environment\PFileFolder\"

Note: - If I am pointing my Package to QA Server, then load the file from QA Path and IF I am pointing my Package to Prod Server then load the file from Prod Path.

Please advise what I am doing wrong?

Thank You.

Can you explain what you are trying to accomplish. It looks like you need a script task to change the connection string for a file based on the connection string of the destination.

Here is a simple expression.

UPPER(Gender) == "M" ? "00001" : "00000"

If my source field value is "M" translate into "00001" else "00000". Am I doing something wrong?
It is is not working as suppose to be. Please advise.

You could setup a project data source and project parameters for this instead. Using a project parameter you can then define your path to either PROD or QA.

Deploy to integration services catalog - setup separate environments with defined values for each path - then configure the package to use the appropriate environment variables.

Much easier to manage an maintain than trying to change folder locations based on what data source you have defined.