Adding filters for a table.

  • 1
  • Question
  • Updated 3 years ago
Hi,
I need to add 4 picklist values and based on the selection I need to display the matching records on a table.
Note : The fields to be filtered is not a column on the table.

Please let me know if this is possible
Photo of Aveleena

Aveleena

  • 140 Points 100 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Yes, it is. Try this tutorial: http://help.skuidify.com/m/models-con...
(Edited)
Photo of Matthias

Matthias

  • 628 Points 500 badge 2x thumb
Hello Aveleena are the picklist values static or are they based on a different model?

I made a sample Page for you containing both. You can either Filter on company name containing one of 4 static strings or you can search by creator of the account based on the user model

Hope this solves your problem:

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true">
   <models>
      <model id="Account" limit="50" query="true" createrowifnonefound="false" adapter="" type="" sobject="Account">
         <fields>
            <field id="Name"/>
         </fields>
         <conditions>
            <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Name" state="filterableoff" inactive="true" name="NamesToFilter" operator="contains"/>
            <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="OwnerId" state="filterableoff" inactive="true" name="OwnerId"/>
         </conditions>
         <actions/>
      </model>
      <model id="User" limit="20" query="true" createrowifnonefound="false" adapter="" type="" sobject="User">
         <fields>
            <field id="Username"/>
            <field id="Name"/>
         </fields>
         <conditions/>
         <actions/>
      </model>
   </models>
   <components>
      <skootable showconditions="true" showsavecancel="true" showerrorsinline="true" searchmethod="server" searchbox="false" showexportbuttons="false" pagesize="10" createrecords="true" model="Account" buttonposition="" mode="read" uniqueid="sk-mVT_A-83" instantfilters="true" emptysearchbehavior="query">
         <fields>
            <field id="Name"/>
         </fields>
         <rowactions>
            <action type="edit"/>
            <action type="delete"/>
         </rowactions>
         <massactions usefirstitemasdefault="true">
            <action type="massupdate"/>
            <action type="massdelete"/>
         </massactions>
         <views>
            <view type="standard"/>
         </views>
         <searchfields/>
         <renderconditions logictype="and"/>
         <filters>
            <filter type="select" filteroffoptionlabel="Show all Accounts" createfilteroffoption="true" affectcookies="true" autocompthreshold="25" conditionsource="manual" labelmode="no" condition="NamesToFilter">
               <sources>
                  <source type="manual" effectsbehavior="justdefault">
                     <options>
                        <option label="Dickenson" type="simple" value="Dickenson"/>
                        <option label="United Oil" type="simple" value="United Oil"/>
                        <option label="Value 3" type="simple" value="GenePoint"/>
                        <option label="Value 4" type="simple" value="Value 4"/>
                     </options>
                  </source>
               </sources>
            </filter>
            <filter type="select" filteroffoptionlabel="All Owners" createfilteroffoption="true" affectcookies="true" autocompthreshold="25" conditionsource="manual" labelmode="no" condition="OwnerId">
               <sources>
                  <source type="model" effectsbehavior="justdefault" model="User">
                     <labeltemplate>{{{Name}}}</labeltemplate>
                     <valuetemplate>{{Id}}</valuetemplate>
                  </source>
               </sources>
            </filter>
         </filters>
      </skootable>
   </components>
   <resources>
      <labels/>
      <javascript/>
      <css/>
   </resources>
   <styles>
      <styleitem type="background" bgtype="none"/>
   </styles>
</skuidpage>

(Edited)