<?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: Filter using Value List (Value Help) in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/filter-using-value-list-value-help/qaa-p/12699954#M4765341</link>
    <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;jessica.de.marchi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if you add UI.selectionFields which is going to enable filter search&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;UI.SelectionFields : [
        &amp;lt;fieldname to filter&amp;gt;,
    ]&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 18 Jan 2023 05:43:52 GMT</pubDate>
    <dc:creator>Yogananda</dc:creator>
    <dc:date>2023-01-18T05:43:52Z</dc:date>
    <item>
      <title>Filter using Value List (Value Help)</title>
      <link>https://community.sap.com/t5/technology-q-a/filter-using-value-list-value-help/qaq-p/12699953</link>
      <description>&lt;P&gt;Hi, Community&lt;/P&gt;
  &lt;P&gt;I have this data model:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;entity Booking : cuid, managed {&lt;BR /&gt;    bookingSkill    : Composition of many BookingSkills&lt;BR /&gt;                        on bookingSkill.parent = $self;&lt;BR /&gt;    bookingResource : Composition of many BookingResources&lt;BR /&gt;                        on bookingResource.parent = $self;&lt;BR /&gt;}&lt;BR /&gt;entity BookingSkills : cuid {&lt;BR /&gt;    parent : Association to Booking;&lt;BR /&gt;    skill  : Association to Skill;&lt;BR /&gt;}&lt;BR /&gt;entity BookingResources : cuid {&lt;BR /&gt;    parent   : Association to Booking;&lt;BR /&gt;    resource : Association to Resource;&lt;BR /&gt;}&lt;BR /&gt;entity Skill : sap.common.CodeList {&lt;BR /&gt;    key code   : Integer;&lt;BR /&gt;        name   : String(255);&lt;BR /&gt;        descr  : String(255);&lt;BR /&gt;}&lt;BR /&gt;entity Resource : cuid, managed {&lt;BR /&gt;    name        : String(255);&lt;BR /&gt;    skills      : Composition of many EmployeeSkills&lt;BR /&gt;                      on skills.resource = $self;&lt;BR /&gt;}&lt;BR /&gt;entity EmployeeSkills : cuid {&lt;BR /&gt;    resource       : Association to one Resource;&lt;BR /&gt;    skill          : Association to one Skill;&lt;BR /&gt;}&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Annotating that in service:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;entity Resource         as projection on ra.Resource;&lt;BR /&gt;entity Skill            as projection on ra.Skill;&lt;BR /&gt;@cds.redirection.target&lt;BR /&gt;@Core.AutoExpand&lt;BR /&gt;entity BookingSkills    as projection on ra.BookingSkills {&lt;BR /&gt;    ID,&lt;BR /&gt;    parent : redirected to Booking,&lt;BR /&gt;    skill  : redirected to Skill&lt;BR /&gt;};&lt;BR /&gt;@cds.redirection.target&lt;BR /&gt;@Core.AutoExpand&lt;BR /&gt;entity BookingResources as projection on ra.BookingResources {&lt;BR /&gt;    ID,&lt;BR /&gt;    parent   : redirected to Booking,&lt;BR /&gt;    resource : redirected to Resource&lt;BR /&gt;};&lt;BR /&gt;entity EmployeeSkills   as projection on ra.EmployeeSkills {&lt;BR /&gt;    ID,&lt;BR /&gt;    skill,&lt;BR /&gt;    resource : redirected to Resource&lt;BR /&gt;};&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;And I need to filter the skill selected in these SmartMultiInput:&lt;/P&gt;
  &lt;P&gt;Skill:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;smartMultiInput:SmartMultiInput value="{path:'bookingSkill/skill_code', templateShareable: true}" /&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Resource:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;smartMultiInput:SmartMultiInput enableODataSelect="true" supportRanges="true" value="{path:'bookingResource/resource_ID', templateShareable: true}"/&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;So I created this annotation:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;annotate service.Skill with {&lt;BR /&gt;    code  @UI.Hidden  @Common : {&lt;BR /&gt;        Text            : name,&lt;BR /&gt;        TextArrangement : #TextOnly&lt;BR /&gt;    };&lt;BR /&gt;};&lt;BR /&gt;annotate service.Resource with {&lt;BR /&gt;    ID   @UI.Hidden  @Common : {&lt;BR /&gt;        Text            : email,&lt;BR /&gt;        TextArrangement : #TextOnly&lt;BR /&gt;    };&lt;BR /&gt;};&lt;BR /&gt;annotate service.BookingSkills with {&lt;BR /&gt;    skill @(&lt;BR /&gt;        title  : 'Skill',&lt;BR /&gt;        Common : {&lt;BR /&gt;            Text            : skill.name,&lt;BR /&gt;            TextArrangement : #TextOnly,&lt;BR /&gt;            ValueListWithFixedValues&lt;BR /&gt;        }&lt;BR /&gt;    );&lt;BR /&gt;};&lt;BR /&gt;annotate service.BookingResources with {&lt;BR /&gt;    resource @(&lt;BR /&gt;        title  : 'Resource',&lt;BR /&gt;        Common : {&lt;BR /&gt;            Text            : resource.name,&lt;BR /&gt;            TextArrangement : #TextOnly,&lt;BR /&gt;            ValueListWithFixedValues,&lt;BR /&gt;            ValueList       : {&lt;BR /&gt;                $Type           : 'Common.ValueListType',&lt;BR /&gt;                CollectionPath  : 'EmployeeSkills',&lt;BR /&gt;                SearchSupported : true,&lt;BR /&gt;                Parameters      : [&lt;BR /&gt;                    {&lt;BR /&gt;                        $Type             : 'Common.ValueListParameterIn',&lt;BR /&gt;                        LocalDataProperty : 'parent/bookingSkill/skill_code',&lt;BR /&gt;                        ValueListProperty : 'skill_code'&lt;BR /&gt;                    },&lt;BR /&gt;                    {&lt;BR /&gt;                        $Type             : 'Common.ValueListParameterOut',&lt;BR /&gt;                        LocalDataProperty : 'resource_ID',&lt;BR /&gt;                        ValueListProperty : 'resource_ID'&lt;BR /&gt;                    },&lt;BR /&gt;                    {&lt;BR /&gt;                        $Type             : 'Common.ValueListParameterDisplayOnly',&lt;BR /&gt;                        ValueListProperty : 'resource_ID'&lt;BR /&gt;                    }&lt;BR /&gt;                ]&lt;BR /&gt;            }&lt;BR /&gt;    );&lt;BR /&gt;};&lt;BR /&gt;annotate service.EmployeeSkills with {&lt;BR /&gt;    resource         @(&lt;BR /&gt;        title  : 'Employee',&lt;BR /&gt;        Common : {&lt;BR /&gt;            Text            : resource.name,&lt;BR /&gt;            TextArrangement : #TextOnly&lt;BR /&gt;        }&lt;BR /&gt;    );&lt;BR /&gt;    skill          @(&lt;BR /&gt;        title  : 'Skill',&lt;BR /&gt;        Common : {&lt;BR /&gt;            Text            : skill.name,&lt;BR /&gt;            TextArrangement : #TextOnly&lt;BR /&gt;        }&lt;BR /&gt;    );&lt;BR /&gt;};&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;But it doesn't work, the filter is not filtering.&lt;/P&gt;
  &lt;P&gt;Do you guys know where I'm doing wrong and how to correct that?&lt;/P&gt;
  &lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2023 19:18:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/filter-using-value-list-value-help/qaq-p/12699953</guid>
      <dc:creator>jessicademarchi</dc:creator>
      <dc:date>2023-01-17T19:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Filter using Value List (Value Help)</title>
      <link>https://community.sap.com/t5/technology-q-a/filter-using-value-list-value-help/qaa-p/12699954#M4765341</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;jessica.de.marchi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if you add UI.selectionFields which is going to enable filter search&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;UI.SelectionFields : [
        &amp;lt;fieldname to filter&amp;gt;,
    ]&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Jan 2023 05:43:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/filter-using-value-list-value-help/qaa-p/12699954#M4765341</guid>
      <dc:creator>Yogananda</dc:creator>
      <dc:date>2023-01-18T05:43:52Z</dc:date>
    </item>
  </channel>
</rss>

