<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Result of if containing fixed value + value of a field in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Result-of-if-containing-fixed-value-value-of-a-field/m-p/263814#M1483</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am looking for a way to make a combined output of an if statement.&lt;/P&gt;&lt;P&gt;Here is my DQL:&lt;/P&gt;&lt;P&gt;| fieldsAdd&lt;BR /&gt;`Flow Object` =&lt;BR /&gt;if(dt.source_entity_name == "cpi_message",&lt;STRONG&gt; "CPI Log "&lt;/STRONG&gt; integration_artifact_name, else:&lt;BR /&gt;if(attributes.type == "c_IntegrationLog__c", &lt;STRONG&gt;"SF Integration Log"&lt;/STRONG&gt; c_SourceSObject__c))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Nov 2024 11:39:07 GMT</pubDate>
    <dc:creator>ANLTH</dc:creator>
    <dc:date>2024-11-27T11:39:07Z</dc:date>
    <item>
      <title>Result of if containing fixed value + value of a field</title>
      <link>https://community.dynatrace.com/t5/DQL/Result-of-if-containing-fixed-value-value-of-a-field/m-p/263814#M1483</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am looking for a way to make a combined output of an if statement.&lt;/P&gt;&lt;P&gt;Here is my DQL:&lt;/P&gt;&lt;P&gt;| fieldsAdd&lt;BR /&gt;`Flow Object` =&lt;BR /&gt;if(dt.source_entity_name == "cpi_message",&lt;STRONG&gt; "CPI Log "&lt;/STRONG&gt; integration_artifact_name, else:&lt;BR /&gt;if(attributes.type == "c_IntegrationLog__c", &lt;STRONG&gt;"SF Integration Log"&lt;/STRONG&gt; c_SourceSObject__c))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2024 11:39:07 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Result-of-if-containing-fixed-value-value-of-a-field/m-p/263814#M1483</guid>
      <dc:creator>ANLTH</dc:creator>
      <dc:date>2024-11-27T11:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Result of if containing fixed value + value of a field</title>
      <link>https://community.dynatrace.com/t5/DQL/Result-of-if-containing-fixed-value-value-of-a-field/m-p/263964#M1487</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/63301"&gt;@ANLTH&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Have you looked at the&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/shortlink/string-functions#concat" target="_self"&gt;concat()&lt;/A&gt;&amp;nbsp; function ?&amp;nbsp;from my understanding this could be what you want to do&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2024 13:18:32 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Result-of-if-containing-fixed-value-value-of-a-field/m-p/263964#M1487</guid>
      <dc:creator>GerardJ</dc:creator>
      <dc:date>2024-11-28T13:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: Result of if containing fixed value + value of a field</title>
      <link>https://community.dynatrace.com/t5/DQL/Result-of-if-containing-fixed-value-value-of-a-field/m-p/263976#M1488</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/63301"&gt;@ANLTH&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;This was an interesting exercise.&lt;/P&gt;&lt;P&gt;You can try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| 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))))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/66575"&gt;@GerardJ&lt;/a&gt; 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 &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Let me know if it does!&lt;/P&gt;&lt;P&gt;Remember, you can always refer to &lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-query-language/functions" target="_self"&gt;DQL functions&lt;/A&gt; and/or &lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-query-language/functions/string-functions" target="_self"&gt;String Functions&lt;/A&gt; on the documentation page to power up your DQL &lt;span class="lia-unicode-emoji" title=":clinking_beer_mugs:"&gt;🍻&lt;/span&gt; But we're also happy to help.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2024 15:22:49 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Result-of-if-containing-fixed-value-value-of-a-field/m-p/263976#M1488</guid>
      <dc:creator>PedroSantos</dc:creator>
      <dc:date>2024-11-28T15:22:49Z</dc:date>
    </item>
  </channel>
</rss>

