<?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: STRING FUNCTIONS in SCREEN PERSONAS in Additional Q&amp;A</title>
    <link>https://community.sap.com/t5/additional-q-a/string-functions-in-screen-personas/qaa-p/10859123#M133576</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;STEP1: COPY_VALUE from textbox and assign to "input".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;STEP2: Calculate in JavaScript:&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;var r = /\d+/;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;args.output = args.input.match(r);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;STEP3: PASTE_VALUE "output"&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Try now?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Jan 2015 01:14:52 GMT</pubDate>
    <dc:creator>sushant_priyadarshi</dc:creator>
    <dc:date>2015-01-29T01:14:52Z</dc:date>
    <item>
      <title>STRING FUNCTIONS in SCREEN PERSONAS</title>
      <link>https://community.sap.com/t5/additional-q-a/string-functions-in-screen-personas/qaq-p/10859119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;I have a requirement where I need to get the EQUIPMENT Number&amp;nbsp; from a long string found in SAP. Please view ATTACHMENT.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;This is my Input string from Tcode IA02.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Input: &lt;SPAN style="color: #222222; font-size: 14.6666660308838px; font-family: georgia, palatino;"&gt;Equipment&amp;nbsp;&amp;nbsp; 149054&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KOMATSU-PC1250LC-8&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;I need the Equipment Number &lt;SPAN style="color: #222222; font-size: 14.6666660308838px;"&gt;&lt;SPAN style="font-family: georgia, palatino;"&gt;149054&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;and the Description &lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-size: 14.6666660308838px; font-family: georgia, palatino;"&gt;KOMATSU-PC1250LC-8 &lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;separately for my output.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;I am not sure if Javascript with string functions will work, since the input has multiple spaces.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas on how to go about this in PERSONAS??? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/633169" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Abraham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2015 12:30:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/string-functions-in-screen-personas/qaq-p/10859119</guid>
      <dc:creator>m4abrams</dc:creator>
      <dc:date>2015-01-28T12:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: STRING FUNCTIONS in SCREEN PERSONAS</title>
      <link>https://community.sap.com/t5/additional-q-a/string-functions-in-screen-personas/qaa-p/10859120#M133573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to use a JavaScript action for this. How you parse it in JS will depend on the structure, but you can certainly do it with JS string functions. You will probably want to use indexOf and lastIndexOf string methods to pick the string apart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2015 12:53:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/string-functions-in-screen-personas/qaa-p/10859120#M133573</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-01-28T12:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: STRING FUNCTIONS in SCREEN PERSONAS</title>
      <link>https://community.sap.com/t5/additional-q-a/string-functions-in-screen-personas/qaa-p/10859121#M133574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi Startlet,&lt;/P&gt;&lt;P&gt;As Steve suggested, you can use javascript for this.&lt;/P&gt;&lt;P&gt;Check the below example code and you can combine what you want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Find out the first occurrences of numbers in a string:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var r = /\d+/;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var s = "149054 KOMOATEST";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; alert (s.match(r));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. You want all the numbers in your string&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var r = /\d+/g;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var s = "635 this is personas 1012";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var m;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; while ((m = r.exec(s)) != null) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(m[0]);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Remove whitespace from string&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var s = "this is my test&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; personas";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; alert(s.replace(/ /g,''));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to learn more about regex in js, you might want to check:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.w3schools.com/jsref/jsref_obj_regexp.asp" title="http://www.w3schools.com/jsref/jsref_obj_regexp.asp"&gt;JavaScript RegExp Reference&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sushant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2015 16:25:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/string-functions-in-screen-personas/qaa-p/10859121#M133574</guid>
      <dc:creator>sushant_priyadarshi</dc:creator>
      <dc:date>2015-01-28T16:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: STRING FUNCTIONS in SCREEN PERSONAS</title>
      <link>https://community.sap.com/t5/additional-q-a/string-functions-in-screen-personas/qaa-p/10859122#M133575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sushant, &lt;/P&gt;&lt;P&gt;This is my code in the script button: &lt;/P&gt;&lt;P&gt;STEP1: COPY_VALUE from textbox and assign to "input".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STEP2: Calculate in JavaScript: &lt;/P&gt;&lt;P&gt;var r = /\d+/; &lt;/P&gt;&lt;P&gt;var args.output = input.match(r);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STEP3: PASTE_VALUE "output" to textbox I am getting an error in STEP2. Could you help me out here ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2015 16:41:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/string-functions-in-screen-personas/qaa-p/10859122#M133575</guid>
      <dc:creator>m4abrams</dc:creator>
      <dc:date>2015-01-28T16:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: STRING FUNCTIONS in SCREEN PERSONAS</title>
      <link>https://community.sap.com/t5/additional-q-a/string-functions-in-screen-personas/qaa-p/10859123#M133576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;STEP1: COPY_VALUE from textbox and assign to "input".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;STEP2: Calculate in JavaScript:&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;var r = /\d+/;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;args.output = args.input.match(r);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;STEP3: PASTE_VALUE "output"&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Try now?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 01:14:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/string-functions-in-screen-personas/qaa-p/10859123#M133576</guid>
      <dc:creator>sushant_priyadarshi</dc:creator>
      <dc:date>2015-01-29T01:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: STRING FUNCTIONS in SCREEN PERSONAS</title>
      <link>https://community.sap.com/t5/additional-q-a/string-functions-in-screen-personas/qaa-p/10859124#M133577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sushant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried as you said in PERSONAS. Now the Javascript error has disappeared but my output is "&lt;STRONG&gt;System.Windows.Browser.ScriptObject&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know what would be wrong here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Abraham&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/633738" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;FYI: The javascript code#1 works perfectly to fetch the Equip# from the string. I tested it on one of the &lt;A href="http://jsfiddle.net/"&gt;online test environments&lt;/A&gt; and it works perfectly.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 07:00:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/string-functions-in-screen-personas/qaa-p/10859124#M133577</guid>
      <dc:creator>m4abrams</dc:creator>
      <dc:date>2015-01-29T07:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: STRING FUNCTIONS in SCREEN PERSONAS</title>
      <link>https://community.sap.com/t5/additional-q-a/string-functions-in-screen-personas/qaa-p/10859125#M133578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;var r = new RegExp('\\d+');&lt;/P&gt;&lt;P&gt;args.output = parseInt(args.input.match(r));&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;args.output = args.input.match(r).toString();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Should work!!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Jan 2015 01:56:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/string-functions-in-screen-personas/qaa-p/10859125#M133578</guid>
      <dc:creator>sushant_priyadarshi</dc:creator>
      <dc:date>2015-01-31T01:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: STRING FUNCTIONS in SCREEN PERSONAS</title>
      <link>https://community.sap.com/t5/additional-q-a/string-functions-in-screen-personas/qaa-p/10859126#M133579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works perfectly.!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Sushant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2015 05:42:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/string-functions-in-screen-personas/qaa-p/10859126#M133579</guid>
      <dc:creator>m4abrams</dc:creator>
      <dc:date>2015-02-02T05:42:02Z</dc:date>
    </item>
  </channel>
</rss>

