<?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 Re: findIndex Usage for the Array in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/findindex-usage-for-the-array/m-p/12465983#M2000596</link>
    <description>&lt;P&gt;Dear &lt;SPAN class="mention-scrubbed"&gt;cristiano.hansen&lt;/SPAN&gt;n，&lt;/P&gt;&lt;P&gt;I found my function is correct, there is only incorrect objectName in my functtion,&lt;/P&gt;&lt;P&gt;Array.findIndex( developmentObject =&amp;gt; (developmentObject.microserviceId == microserviceId &amp;amp;&amp;amp; developmentObject.objectName == objectName));&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 26 Apr 2021 06:27:02 GMT</pubDate>
    <dc:creator>former_member492955</dc:creator>
    <dc:date>2021-04-26T06:27:02Z</dc:date>
    <item>
      <title>findIndex Usage for the Array</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/findindex-usage-for-the-array/m-p/12465978#M2000591</link>
      <description>&lt;P&gt;There is an array :&lt;/P&gt;
  &lt;P&gt;Array: this.getView().getModel("objects").getProperty("/developmentObjects")&lt;/P&gt;
  &lt;P&gt;I want to find the index in the array, but there are two parameters that should be equal:&lt;/P&gt;
  &lt;P&gt;Array.findIndex( developmentObject =&amp;gt; (developmentObject.microserviceId == microserviceId &amp;amp;&amp;amp; developmentObject.objectName == objectName));&lt;/P&gt;
  &lt;P&gt;The microserviceId and the objectName should bot fulfill the value.&lt;/P&gt;
  &lt;P&gt;From my coding, the return value is -1.&lt;/P&gt;
  &lt;P&gt;But this development object is really in the table&lt;/P&gt;
  &lt;P&gt;How can I change the sentence?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 10:15:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/findindex-usage-for-the-array/m-p/12465978#M2000591</guid>
      <dc:creator>former_member492955</dc:creator>
      <dc:date>2021-04-16T10:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: findIndex Usage for the Array</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/findindex-usage-for-the-array/m-p/12465979#M2000592</link>
      <description>&lt;P&gt;Dear Bella,&lt;/P&gt;&lt;P&gt;Maybe you can check &lt;A href="https://www.educba.com/javascript-findindex/" target="_blank"&gt;this page&lt;/A&gt; for an working example.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.javascripttutorial.net/es6/javascript-array-findindex/" target="_blank"&gt;This tutorial&lt;/A&gt; might help too.&lt;/P&gt;&lt;P&gt;I also would debug the code or use the console to find the values being evaluated by findIndex and see why the result is -1.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Cris&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 10:57:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/findindex-usage-for-the-array/m-p/12465979#M2000592</guid>
      <dc:creator>cris_hansen</dc:creator>
      <dc:date>2021-04-16T10:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: findIndex Usage for the Array</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/findindex-usage-for-the-array/m-p/12465980#M2000593</link>
      <description>&lt;P&gt;Dear &lt;SPAN class="mention-scrubbed"&gt;cristiano.hansen&lt;/SPAN&gt;n&lt;/P&gt;&lt;P&gt;Thanks for your reply, I checked the page, but all the example provide only one parameter.&lt;/P&gt;&lt;P&gt;It is ok for my example if I only set one parameter:&lt;/P&gt;&lt;P&gt;Array.findIndex( developmentObject =&amp;gt; developmentObject.uuid == uuid );&lt;/P&gt;&lt;P&gt;But when I change it to fulfill two conditions, then the result will be -1 for my example:&lt;/P&gt;&lt;P&gt;Array.findIndex( developmentObject =&amp;gt; (developmentObject.microserviceId == microserviceId &amp;amp;&amp;amp; developmentObject.objectName == objectName));&lt;/P&gt;&lt;P&gt;I can find the object in the array, but the findindex result is -1, I think maybe I have some syntax error.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 06:05:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/findindex-usage-for-the-array/m-p/12465980#M2000593</guid>
      <dc:creator>former_member492955</dc:creator>
      <dc:date>2021-04-19T06:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: findIndex Usage for the Array</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/findindex-usage-for-the-array/m-p/12465981#M2000594</link>
      <description>&lt;P&gt;Dear Bella,&lt;/P&gt;&lt;P&gt;Have you tried:&lt;/P&gt;&lt;P&gt;Array.findIndex( developmentObject =&amp;gt; 
((developmentObject.microserviceId == microserviceId) &amp;amp;&amp;amp; 
(developmentObject.objectName == objectName)));&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;Maybe you can print the values, just to be sure that the values are the expected ones.&lt;/P&gt;&lt;P&gt;I'll see whether I find an example with two conditions.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Cris&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 15:19:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/findindex-usage-for-the-array/m-p/12465981#M2000594</guid>
      <dc:creator>cris_hansen</dc:creator>
      <dc:date>2021-04-19T15:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: findIndex Usage for the Array</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/findindex-usage-for-the-array/m-p/12465982#M2000595</link>
      <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;bella.fang&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Could you please share example data of your model (without sensitive information)?&lt;/P&gt;&lt;P&gt;Especially the developmentObjects part.&lt;/P&gt;&lt;P&gt;The syntax you are using is correct: &lt;A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions#basic_syntax"&gt;Arrow function expressions - JavaScript | MDN&lt;BR /&gt;&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 12:46:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/findindex-usage-for-the-array/m-p/12465982#M2000595</guid>
      <dc:creator>catano</dc:creator>
      <dc:date>2021-04-22T12:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: findIndex Usage for the Array</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/findindex-usage-for-the-array/m-p/12465983#M2000596</link>
      <description>&lt;P&gt;Dear &lt;SPAN class="mention-scrubbed"&gt;cristiano.hansen&lt;/SPAN&gt;n，&lt;/P&gt;&lt;P&gt;I found my function is correct, there is only incorrect objectName in my functtion,&lt;/P&gt;&lt;P&gt;Array.findIndex( developmentObject =&amp;gt; (developmentObject.microserviceId == microserviceId &amp;amp;&amp;amp; developmentObject.objectName == objectName));&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 06:27:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/findindex-usage-for-the-array/m-p/12465983#M2000596</guid>
      <dc:creator>former_member492955</dc:creator>
      <dc:date>2021-04-26T06:27:02Z</dc:date>
    </item>
  </channel>
</rss>

