Add Blank option to the Text field on Table filter

AkankshaAkanksha ✭✭
edited March 6, 2020 in Questions
there's an option to add a multi-select filter to a table on a Text field which contains 2 value either "XYZ" or blank,
i have already applied below options, but all are failed so please help me to resolve this usse on a very urgent basic,
1.Convert text into Picklist and add manual picklist enties values,

2.Convert text into Picklist and getting picklist values from snippet
var params = arguments[0],
$ = skuid.$;
var entries = [];
entries.push(
   { value: 'XYZ', label: 'XYZ', defaultValue: false},
   { value: '' , label: 'Blank', defaultValue: false}
);
return entries; 
3.https://community.skuid.com/skuid/topics/auto-create-blank-as-a-filter-option

when i select blank option from the filter drop down,  then after apply it , it removed the blank selection and i want to filter out all the blank records

Comments

  • Luzie BaumgartLuzie Baumgart 🛠️ 
    edited February 20, 2020
    Dear Akanksha, thank you for reaching out, blank/empty/null values can be tricky. In case you haven't found a solution in the meantime, I hope our findings are helpful for you. If we understood your requirements correctly, that you need to be able to offer an "empty" option in a multi-selection filter, below is what we did to make it work. In order to be able to share the page XML with you, we used only Salesforce standard objects and fields: Opportunity object and the fields "Name" and "NextStep".
    1. Override field metadata of the "NextStep" text field so that it's displayed as a picklist.
    2. Manual picklist entry: XYZ
    3. Please note that we didn't add an extra "blank" option.
    4. Added an inactive condition named "NextStepEmpty" to filter for empty values.
    5. Added an inactive condition named "NextStepValue" to filter for multiple values.
    6. Condition Grouping Logic: "1 OR 2"
    7. Added a filter of type "Multi-select Option" to the Table component.
    8. Pick Options and Condition(s) = Manually
    9. Model Condition to Affect = NextStepValue
    10. Now we added two different manual sources, first: Picklist option to affect the default condition.
    11. And "Manual" to affect the other condition, simply to "Activate" the "NextStepEmpty" condition.
    Please note that we created this V1 test page in the latest Skuid version: 12.2.15
    In case this doesn't do what you expect and you use an older version, we recommend to upgrade a Sandbox to test this page (As a reminder, Salesforce does NOT allow reverting back to prior versions of managed packages. Skuid always recommends installing new versions in a non-business critical sandbox environment to test all mission critical functionality before installing into a production environment. We also recommend that you update out of date themes after you upgraded).

    If it still doesn't show the expected result, please share more information about the result you see on the test page and the result you would expect.
    Regards, Luzie & team

    <skuidpage personalizationmode="server" showsidebar="false" showheader="false" globalfeedbackenabled="false">
    <models>
    <model id="Opps" limit="20" query="true" createrowifnonefound="true" datasource="salesforce" sobject="Opportunity">
    <fields>
    <field id="NextStep" overridemetadata="true" ogdisplaytype="STRING" displaytype="PICKLIST" picklistsource="manual" returntype="TEXT" defaultvaluetype="fieldvalue">
    <picklistentries>
    <entry value="XYZ" label="XYZ"/>
    </picklistentries>
    </field>
    <field id="Name"/>
    </fields>
    <actions/>
    <conditions logic="1 OR 2">
    <condition type="blank" value="null" field="NextStep" inactive="true" operator="=" enclosevalueinquotes="false" state="filterableoff" name="NextStepEmpty"/>
    <condition type="multiple" value="" field="NextStep" state="filterableoff" inactive="true" name="NextStepValue" operator="in" enclosevalueinquotes="true">
    <values>
    <value/>
    </values>
    </condition>
    </conditions>
    </model>
    </models>
    <components>
    <skootable showconditions="true" showsavecancel="true" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" hideheader="false" hidefooter="false" pagesize="10" alwaysresetpagination="false" createrecords="true" model="Opps" buttonposition="" mode="read" allowcolumnreordering="true" responsive="true" uniqueid="sk-1Z94-357">
    <fields>
    <field id="Name" hideable="true" uniqueid="fi-1Zs--324"/>
    <field id="NextStep" hideable="true" uniqueid="fi-1ZDh-602"/>
    </fields>
    <rowactions>
    <action type="edit"/>
    <action type="delete"/>
    </rowactions>
    <massactions usefirstitemasdefault="true"/>
    <views/>
    <filters>
    <filter type="multiselect" createfilteroffoption="true" affectcookies="false" autocompthreshold="25" conditionsource="manual" filtermethod="server" labelmode="no" filteroffoptionlabel="Show all records" condition="NextStepValue">
    <sources>
    <source type="metadata" effectsbehavior="justdefault" model="Opps"/>
    <source type="manual" effectsbehavior="justdefault">
    <options>
    <option label="blank" type="complex">
    <effects>
    <effect action="activate" value="" condition="NextStepEmpty"/>
    </effects>
    </option>
    </options>
    </source>
    </sources>
    </filter>
    </filters>
    <searchfields/>
    </skootable>
    </components>
    <resources>
    <labels/>
    <javascript/>
    <css/>
    <actionsequences uniqueid="sk-1Z8y-293"/>
    </resources>
    <styles>
    <styleitem type="background" bgtype="none"/>
    </styles>
    </skuidpage>
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!