<?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: MDK Object Table control Search doesn´t function for binding with Client Data in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/mdk-object-table-control-search-doesn-t-function-for-binding-with-client/qaa-p/12518316#M4692020</link>
    <description>&lt;P&gt;Another option is to still use the standard object table search input but instead of directly binding to the #ClientData you can use a rule.  The rule will normally just return the ClientData value but when a search term is input it will re-execute the rule and you can then implement your custom search logic inside the rule and return the filtered sub-set of values.&lt;/P&gt;&lt;P&gt;Here is an example rule where I have the target for my Object Table set to this rule and inside the rule when the user searches I am filtering my Products list (from the Sample service) on Name or Category Name.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;/**
 * Describe this function...
 * @param {IClientAPI} context
 */
export default function GetStringTargetWithSearch(context) {
    let target = context.evaluateTargetPath('#Page:Main/#ClientData/#Property:ProductsList');
    let searchString = context.searchString;
    if (searchString) {
        let searchResult = target.filter(prod =&amp;gt; { return prod.Name.includes(searchString) || prod.CategoryName.includes(searchString) });
        target = searchResult;
    }

    return target;
}
&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 03 Nov 2021 15:26:59 GMT</pubDate>
    <dc:creator>bill_froelich</dc:creator>
    <dc:date>2021-11-03T15:26:59Z</dc:date>
    <item>
      <title>MDK Object Table control Search doesn´t function for binding with Client Data</title>
      <link>https://community.sap.com/t5/technology-q-a/mdk-object-table-control-search-doesn-t-function-for-binding-with-client/qaq-p/12518314</link>
      <description>&lt;P&gt;Dear Experts:&lt;/P&gt;
  &lt;P&gt;I am using Object Table control to show the table from Client Data using binding TARGET -&amp;gt; STRING TARGET -&amp;gt;{#Page:Main/#ClientData/#Property:ListOrders}.&lt;/P&gt;
  &lt;P&gt;It shows the table contents in the Object Table, however it´s single field Search function doen´t work, meaning doesn´t filter as I type values. &lt;/P&gt;
  &lt;P&gt;This function seem to work ok with EntitySet Binding with OData.&lt;/P&gt;
  &lt;P&gt;Is it something restricted for this control if use Client Data as a binding? If so is there some workaround suggestions?&lt;/P&gt;
  &lt;P&gt;Many thanks,&lt;/P&gt;
  &lt;P&gt;Yergali&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 09:59:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mdk-object-table-control-search-doesn-t-function-for-binding-with-client/qaq-p/12518314</guid>
      <dc:creator>yyertuganov</dc:creator>
      <dc:date>2021-11-03T09:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: MDK Object Table control Search doesn´t function for binding with Client Data</title>
      <link>https://community.sap.com/t5/technology-q-a/mdk-object-table-control-search-doesn-t-function-for-binding-with-client/qaa-p/12518315#M4692019</link>
      <description>&lt;P&gt;Hi Yergali&lt;/P&gt;&lt;P&gt;Yes, Search functionality only works for binding with EntitySet, that's why it's not working with Target Path binding with #ClientData.&lt;/P&gt;&lt;P&gt;A possible workaround will be implementing your own search input (e.g. using Simple Property Form Cell) + custom search logic inside OnValueChange to update your ClientData with filtered data and then redraw the Object Table Section.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ming&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 10:09:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mdk-object-table-control-search-doesn-t-function-for-binding-with-client/qaa-p/12518315#M4692019</guid>
      <dc:creator>mingkho</dc:creator>
      <dc:date>2021-11-03T10:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: MDK Object Table control Search doesn´t function for binding with Client Data</title>
      <link>https://community.sap.com/t5/technology-q-a/mdk-object-table-control-search-doesn-t-function-for-binding-with-client/qaa-p/12518316#M4692020</link>
      <description>&lt;P&gt;Another option is to still use the standard object table search input but instead of directly binding to the #ClientData you can use a rule.  The rule will normally just return the ClientData value but when a search term is input it will re-execute the rule and you can then implement your custom search logic inside the rule and return the filtered sub-set of values.&lt;/P&gt;&lt;P&gt;Here is an example rule where I have the target for my Object Table set to this rule and inside the rule when the user searches I am filtering my Products list (from the Sample service) on Name or Category Name.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;/**
 * Describe this function...
 * @param {IClientAPI} context
 */
export default function GetStringTargetWithSearch(context) {
    let target = context.evaluateTargetPath('#Page:Main/#ClientData/#Property:ProductsList');
    let searchString = context.searchString;
    if (searchString) {
        let searchResult = target.filter(prod =&amp;gt; { return prod.Name.includes(searchString) || prod.CategoryName.includes(searchString) });
        target = searchResult;
    }

    return target;
}
&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Nov 2021 15:26:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mdk-object-table-control-search-doesn-t-function-for-binding-with-client/qaa-p/12518316#M4692020</guid>
      <dc:creator>bill_froelich</dc:creator>
      <dc:date>2021-11-03T15:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: MDK Object Table control Search doesn´t function for binding with Client Data</title>
      <link>https://community.sap.com/t5/technology-q-a/mdk-object-table-control-search-doesn-t-function-for-binding-with-client/qaa-p/12518317#M4692021</link>
      <description>&lt;P&gt;Thanks a lot Ming, will try this method!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 17:26:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mdk-object-table-control-search-doesn-t-function-for-binding-with-client/qaa-p/12518317#M4692021</guid>
      <dc:creator>yyertuganov</dc:creator>
      <dc:date>2021-11-03T17:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: MDK Object Table control Search doesn´t function for binding with Client Data</title>
      <link>https://community.sap.com/t5/technology-q-a/mdk-object-table-control-search-doesn-t-function-for-binding-with-client/qaa-p/12518318#M4692022</link>
      <description>&lt;P&gt;Thanks a lot Bill, will try this method as well!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 17:27:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mdk-object-table-control-search-doesn-t-function-for-binding-with-client/qaa-p/12518318#M4692022</guid>
      <dc:creator>yyertuganov</dc:creator>
      <dc:date>2021-11-03T17:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: MDK Object Table control Search doesn´t function for binding with Client Data</title>
      <link>https://community.sap.com/t5/technology-q-a/mdk-object-table-control-search-doesn-t-function-for-binding-with-client/qaa-p/12518319#M4692023</link>
      <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;ming.kho&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;My list is binded to an entity set with a defined rule for a query option, and the filter does not work. Do you know the possible cause for this? What can be done to solve this issue?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 16:06:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mdk-object-table-control-search-doesn-t-function-for-binding-with-client/qaa-p/12518319#M4692023</guid>
      <dc:creator>sopizaken</dc:creator>
      <dc:date>2022-02-28T16:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: MDK Object Table control Search doesn´t function for binding with Client Data</title>
      <link>https://community.sap.com/t5/technology-q-a/mdk-object-table-control-search-doesn-t-function-for-binding-with-client/qaa-p/12518320#M4692024</link>
      <description>&lt;P&gt;Rachel, Since this question os already answered, please open a new question with the specifics of issue. &lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 20:50:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mdk-object-table-control-search-doesn-t-function-for-binding-with-client/qaa-p/12518320#M4692024</guid>
      <dc:creator>bill_froelich</dc:creator>
      <dc:date>2022-03-04T20:50:31Z</dc:date>
    </item>
  </channel>
</rss>

