<?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: Setting a Default Value for Filter in Fiori Elements using Annotations in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601197#M4726017</link>
    <description>&lt;P&gt;Thank You Bernard. Your solution/suggestion worked. &lt;/P&gt;</description>
    <pubDate>Thu, 25 Aug 2022 23:08:51 GMT</pubDate>
    <dc:creator>pghoshroy</dc:creator>
    <dc:date>2022-08-25T23:08:51Z</dc:date>
    <item>
      <title>Setting a Default Value for Filter in Fiori Elements using Annotations</title>
      <link>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaq-p/12601188</link>
      <description>&lt;P&gt;Hi experts....&lt;/P&gt;
  &lt;P&gt;I have developed a simple app using Fiori Elements to show products for a particular store. For the app to work the user needs to provide the store or select the store.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2085867-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;As you can see it's a fixed value drop down list that I was able to achieve using the following annotation.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2085868-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;So now my next assignment is to assign a default value to it e.g. store name "ABC"; to save the user time from selecting it. However, the default value must be one from the existing list of stores (i.e. . ZPOS_C_STORE_NAME)&lt;/P&gt;
  &lt;P&gt;Can anyone advise how I can achieve this using Annotations or by App extension?&lt;/P&gt;
  &lt;P&gt;So basically, when the app loads; then it should look something like this before I press GO:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2085869-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;The App just uses 2 CDS views one for the complete list of Stores and Products/Material and CDS2 that provides a list of stores (which I am using for the Drop-Down List). &lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Pablo Ghosh Roy&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 03:59:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaq-p/12601188</guid>
      <dc:creator>pghoshroy</dc:creator>
      <dc:date>2022-08-23T03:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Setting a Default Value for Filter in Fiori Elements using Annotations</title>
      <link>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601189#M4726009</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The annotation below should do  the trick.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;Annotation Term="Common.FilterDefaultValue" String="ABC"/&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Aug 2022 05:38:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601189#M4726009</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2022-08-23T05:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Setting a Default Value for Filter in Fiori Elements using Annotations</title>
      <link>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601190#M4726010</link>
      <description>&lt;P&gt;Hi Bernard,&lt;/P&gt;&lt;P&gt;Thank you so much for your response. Can you please advise; how can I retrieve the value "ABC" in this case without hardcoding the value "ABC"?&lt;/P&gt;&lt;P&gt;Do I need to create another CDS View that would only contain the default value "ABC" as a single row and associate it to the main CDS Service?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pablo Ghosh Roy&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 05:44:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601190#M4726010</guid>
      <dc:creator>pghoshroy</dc:creator>
      <dc:date>2022-08-23T05:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Setting a Default Value for Filter in Fiori Elements using Annotations</title>
      <link>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601191#M4726011</link>
      <description>&lt;P&gt;It may  depend on the store default you want to display.&lt;/P&gt;&lt;P&gt;Is the default store any random valid store?&lt;/P&gt;&lt;P&gt;Or is the store to be displayed a store that is contextually relevant to the user?&lt;/P&gt;&lt;P&gt;(If the latter there is a default value personalisation option)&lt;/P&gt;&lt;P&gt;Just not sure what your intention is here.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 05:50:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601191#M4726011</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2022-08-23T05:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Setting a Default Value for Filter in Fiori Elements using Annotations</title>
      <link>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601192#M4726012</link>
      <description>&lt;P&gt;Have you tried the option to save variants? That way you only have to instruct the users once to create such a variant and set it as their default. If not all users should see all stores that you have to solve that using authorizations.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 06:03:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601192#M4726012</guid>
      <dc:creator>gregorw</dc:creator>
      <dc:date>2022-08-23T06:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Setting a Default Value for Filter in Fiori Elements using Annotations</title>
      <link>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601193#M4726013</link>
      <description>&lt;P&gt;If you want to set default values dynamically, the following blog post may be relevant.&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2020/08/15/sap-fiori-elements-initial-filter-values/"&gt;https://blogs.sap.com/2020/08/15/sap-fiori-elements-initial-filter-values/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 12:37:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601193#M4726013</guid>
      <dc:creator>MioYasutake</dc:creator>
      <dc:date>2022-08-23T12:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Setting a Default Value for Filter in Fiori Elements using Annotations</title>
      <link>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601194#M4726014</link>
      <description>&lt;P&gt;Hi Bernard,&lt;/P&gt;&lt;P&gt;Thank you again for your response and I apologise if you found my question vague.&lt;/P&gt;&lt;P&gt;The scenario is .... Users will be assigned to a particular store. So, when a user logs onto the app; I must default the value of the store to which the user is assigned to; however, they do have the option to change and see the data for other stores.&lt;/P&gt;&lt;P&gt;e.g. User A, B, C are assigned to Stores 1,2,3. So, when User A opens the app; they can see the value 1 defaulted in the Store; similarly, B will see the value 2 as the store and C will see 3.&lt;/P&gt;&lt;P&gt;Now I have a single CDS view that lists all the materials across all stores. "C_MAT_STOCK_BY_PLANT_CDS"&lt;/P&gt;&lt;P&gt;Then I have another CDS that has the list of store and store names (which forms the Value List). "C_STORE_NAME"&lt;/P&gt;&lt;P&gt;Now I am trying to find a way to default the Store in the Value List/Drop Down. (The relation between the store and user is maintained in a table).&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pablo Ghosh Roy&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 23:40:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601194#M4726014</guid>
      <dc:creator>pghoshroy</dc:creator>
      <dc:date>2022-08-23T23:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Setting a Default Value for Filter in Fiori Elements using Annotations</title>
      <link>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601195#M4726015</link>
      <description>&lt;P&gt;Hi Mio,&lt;/P&gt;&lt;P&gt;Thank you for the link. I have seen that post before; I will revisit to see if it helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pablo Ghosh Roy&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 23:46:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601195#M4726015</guid>
      <dc:creator>pghoshroy</dc:creator>
      <dc:date>2022-08-23T23:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: Setting a Default Value for Filter in Fiori Elements using Annotations</title>
      <link>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601196#M4726016</link>
      <description>&lt;P&gt;You could add an association to your OData service (Consumer CDS view) where you have the user-to-store mapping.&lt;/P&gt;&lt;P&gt;You could then do a Fiori App extension, retrieve the store for the current user and set the relevant filter (i.e. your store filter) to the value retrieved.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 07:32:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601196#M4726016</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2022-08-24T07:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Setting a Default Value for Filter in Fiori Elements using Annotations</title>
      <link>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601197#M4726017</link>
      <description>&lt;P&gt;Thank You Bernard. Your solution/suggestion worked. &lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 23:08:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601197#M4726017</guid>
      <dc:creator>pghoshroy</dc:creator>
      <dc:date>2022-08-25T23:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Setting a Default Value for Filter in Fiori Elements using Annotations</title>
      <link>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601198#M4726018</link>
      <description>&lt;P&gt;Thanks Bernard.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 14:15:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/12601198#M4726018</guid>
      <dc:creator>former_member822674</dc:creator>
      <dc:date>2022-10-06T14:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Setting a Default Value for Filter in Fiori Elements using Annotations</title>
      <link>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/13742572#M4834485</link>
      <description>Hi Pablo, Would you be able to share the details/steps of your solution that worked? I have a similar requirement but for a filter field that can accept multiple values. The possible values would be dynamic. It could be one value or a hundred of them. These values may come from a db table linked to the current user. Pls advise. Thanks.</description>
      <pubDate>Tue, 25 Jun 2024 20:48:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/setting-a-default-value-for-filter-in-fiori-elements-using-annotations/qaa-p/13742572#M4834485</guid>
      <dc:creator>LN1</dc:creator>
      <dc:date>2024-06-25T20:48:35Z</dc:date>
    </item>
  </channel>
</rss>

