<?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>Question Re: If... in - multiple values in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/if-in-multiple-values/qaa-p/11619662#M4338422</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;My edit isn't showing up - the if statement should b: &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;if InStr({@Values}, ToText({pool_bearbeit.typ}, 0, "") + ",") = 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;This will take care of instances where you have numbers "inside" other numbers, such as if you have a value in {pool_bearbeit.typ} of 20. Since "20"&amp;nbsp; is in part of 200 it's data would not be included in the "then" portion of the If statement.&amp;nbsp; Having the comma on the end of the field value when you're searching prevents this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;-Dell&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Feb 2016 20:50:36 GMT</pubDate>
    <dc:creator>DellSC</dc:creator>
    <dc:date>2016-02-26T20:50:36Z</dc:date>
    <item>
      <title>If... in - multiple values</title>
      <link>https://community.sap.com/t5/technology-q-a/if-in-multiple-values/qaq-p/11619658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following statement in a formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;&lt;EM&gt;if not ({pool_bearbeit.typ} in [200,401,409,410,411,413,420,450]&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The numbers are processes, constantly added or deprecated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To make this more manageable and visible, I'd like to be able to dynamically display these numbers in the page header, to confirm to the User what is actually being chosen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe I've seen code where a single value is entered as a parameter, and then passed through to the report, invisible to the User, but the setup eludes me, and I don't know if that can be done for multiple values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What method can I use to do this?&amp;nbsp; I imagine it's possible, but the syntax eludes me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would need an option for both numerics and strings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 16:03:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/if-in-multiple-values/qaq-p/11619658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-26T16:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: If... in - multiple values</title>
      <link>https://community.sap.com/t5/technology-q-a/if-in-multiple-values/qaa-p/11619659#M4338419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Hi Matthew, &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;You can create a parameter and set it to allow multiple values.&amp;nbsp; Change your formula to use the parameter instead of the array.&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;You can create a formula to display the array like:&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P&gt;NumberVar i; &lt;/P&gt;&lt;P&gt;StringVar myArray; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i := 1; &lt;/P&gt;&lt;P&gt;myArray := ""; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While i &amp;lt;= Count ({?My Parameter}) Do &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; myArray := myArray &amp;amp; ToText ({?My Parameter} [i], 0, "") &amp;amp; ", "; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; i := i + 1; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Removes the trailing comma &lt;/P&gt;&lt;P&gt;myArray [1 to Length (myArray) - 2]; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;SPAN style="font-size: 13.3333px;"&gt;Count ({?My Parameter}) is the number of elements in the parameter.&amp;nbsp; So it just loops through all of the numbers in your parameter, converts them to a string and lists them out.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck, &lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 18:32:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/if-in-multiple-values/qaa-p/11619659#M4338419</guid>
      <dc:creator>former_member292966</dc:creator>
      <dc:date>2016-02-26T18:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: If... in - multiple values</title>
      <link>https://community.sap.com/t5/technology-q-a/if-in-multiple-values/qaa-p/11619660#M4338420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't want Users to have to select the values from a dialog box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've seen (in fact our vendor uses it often) where the parameter value is set, automatically passed, and the parameter dialog box isn't even displayed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 20:28:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/if-in-multiple-values/qaa-p/11619660#M4338420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-26T20:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: If... in - multiple values</title>
      <link>https://community.sap.com/t5/technology-q-a/if-in-multiple-values/qaa-p/11619661#M4338421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What software package is your vendor providing?&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp; They are probably setting the parameter value automatically in their code and you would have to find some way to hook into that mechanism.&lt;/SPAN&gt;&amp;nbsp; So, you'll have to go to them to ask this question because we have no way of knowing how they've done this particular task through the SDK and what types of values they've set it up to accept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can't do this through them then I may have another way of doing this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Create a formula that is just a string value.&amp;nbsp; In your example above, it would look like this (note the final comma on the end!):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{@Values}&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-family: inherit; background: transparent;"&gt;&lt;EM&gt;"200,401,409,410,411,413,420,450,"&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Create a formula to display this list correctly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{@ShowValues}&lt;/P&gt;&lt;P&gt;left({@Values}, Length({@Values} - 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; Change the If statement to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if InStr({@Values}, {pool_bearbeit.typ}+",") = 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To update this list, you only have to change it in {@Values}.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Dell&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Dell Stinnett-Christy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 20:43:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/if-in-multiple-values/qaa-p/11619661#M4338421</guid>
      <dc:creator>DellSC</dc:creator>
      <dc:date>2016-02-26T20:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: If... in - multiple values</title>
      <link>https://community.sap.com/t5/technology-q-a/if-in-multiple-values/qaa-p/11619662#M4338422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;My edit isn't showing up - the if statement should b: &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;if InStr({@Values}, ToText({pool_bearbeit.typ}, 0, "") + ",") = 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;This will take care of instances where you have numbers "inside" other numbers, such as if you have a value in {pool_bearbeit.typ} of 20. Since "20"&amp;nbsp; is in part of 200 it's data would not be included in the "then" portion of the If statement.&amp;nbsp; Having the comma on the end of the field value when you're searching prevents this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;-Dell&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 20:50:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/if-in-multiple-values/qaa-p/11619662#M4338422</guid>
      <dc:creator>DellSC</dc:creator>
      <dc:date>2016-02-26T20:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: If... in - multiple values</title>
      <link>https://community.sap.com/t5/technology-q-a/if-in-multiple-values/qaa-p/11619663#M4338423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Dell.&amp;nbsp; I will give this a shot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 21:13:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/if-in-multiple-values/qaa-p/11619663#M4338423</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-26T21:13:58Z</dc:date>
    </item>
  </channel>
</rss>

