Result of if containing fixed value + value of a field

Hi

I am looking for a way to make a combined output of an if statement.

Here is my DQL:

| fieldsAdd
`Flow Object` =
if(dt.source_entity_name == “cpi_message”, "CPI Log " integration_artifact_name, else:
if(attributes.type == “c_IntegrationLog__c”, “SF Integration Log” c_SourceSObject__c))

I need the result of the if statement to contain a fixed text i.g. CPI Log followed by the content of the integration_artifcat_name field.

Hi @ANLTH 
Have you looked at the concat()  function ? from my understanding this could be what you want to do

Hello @ANLTH ,

This was an interesting exercise.

You can try this:

| fieldsadd FlowObject =if(matchesphrase(dt.source_entity_name, "cpi_message"), (concat("CPI Log", " ", integration_artifact_name)), else:
if(matchesphrase(attributes.type, "c_IntegrationLog__c"), (concat("SF Integration Log", " ", c_SourceSObject__c))))

As @GerardJ mentioned, this makes use of the concat function and makes it work for you. I tested it successfully on my notebook end (with different parameters), so it should work for you as well :slightly_smiling_face: Let me know if it does!

Remember, you can always refer to DQL functions and/or String Functions on the documentation page to power up your DQL :clinking_beer_mugs: But we’re also happy to help.