Skip to main content

After upgrading Skuid to version 11.2.11, my table filters stopped working correctly. Upon further investigation, I have noticed the following:


Executing skuid.model.getModel(‘WorkOrder’).soql; in the console after the filter has been selected returns the following query (worth noting that the “WHERE” clause is a condition set to “always on”):


 SELECT p...omitted fields]
FROM WorkOrder__c
WHERE (Stage__c not in ('Cancelled','Complete','In invoicing','Junked'))
ORDER BY Expected_ship_date__c
However, if I reload the page after selecting the filter, Skuid will query the records correctly:

 SELECT o...omitted fields]
FROM WorkOrder__c
WHERE (Stage__c not in ('Cancelled','Complete','In invoicing','Junked'))
AND (RecordTypeId in ('012G0000000sK4bIAE','012G0000000sK4gIAE','01216000000We6dAAC','012G0000000sK4WIAU'))
AND (Stage__c not in ('In receiving','Pending return','Pending approval'))
ORDER BY Expected_ship_date__c

...where the filter represents the two "AND" statements.

It seems to me that the filters are not being registered properly by Skuid. Is there anything I can do to circumvent this situation?

I’ve seen something like this at https://community.skuid.com/t/model-with-a-subquery-condition-and-a-subcondition-migrated… – No answer yet.


Leonardo,


Do you have a page that I can use to reproduce the issue in a Developer org.?  Maybe you can use Opportunities?


If not, can you post the XML from your model.


Thanks,


Bill


Hi Bill,

Unfortunately, we don’t have the page in a dev org. Here is the XML from the model:

                                                                                                                                                                          


Leonardo,


I think this is the WSDL for the object from Salesforce.


I wanted you to open your Skuid page in the page builder. Scroll down to the bottom of the page. Click the link called ‘View/Edit XML’. Then find the model for the Work Order.


The model XML from the Skuid page will look like this:


        <model id="Account" limit="1" query="true" createrowifnonefound="false" datasource="salesforce" sobject="Account" type="">
<fields>
<field id="Name"/>
<field id="CreatedDate"/>
<field id="Id"/>
<field id="Description"/>
<field id="SicDesc"/>
</fields>
<conditions>
<condition type="param" enclosevalueinquotes="true" operator="=" field="Id" value="id"/>
</conditions>
<actions/>
</model>
Thanks,

Bill


Sorry, my bad… Here’s the Work Order model from the Skuid page:


                                      IF(ISBLANK({{SpecialInstructions__c}}),false,true)          Cancelled Complete In invoicing Junked     Sale Lease Replacement RaD_SaM     Calibration Repair Replacement Upgrade     In receiving Pending return Pending approval     Pending approval In receiving Pending return        

Leonardo,

Thanks for posting your model.  Nothing jumps out about your model except for having multiple conditions on the same field (RecordTypeId).  I tried recreating it on Opportunities, but so far I have not been able to see what you are seeing.

One thing that you can try is to make a saved version of your page (so that you have a roll back point).  Remove all of the conditions and then add them back 1 by 1 and check the SOQL each time until you see an issue.

Thanks,

Bill


Bill, 

Trying to add the conditions as you suggested didn’t work for me. I’ve also updated Skuid to version 12.0.2, but that didn’t fix the issue either.


I have had this same issue for about a month. - still ongoing.


There was an issue that text entry-based filters (Multi-Select / Select Option) were not registering unless the page was refreshed (apparently fixed in 11.2.6 and 11.2.7). No issues with those here.


However in my recent experience, this issue still seems to be the case with Date Range and Toggle filters - possibly Numeric Range as well (haven’t tested that one specifically for the error yet).


Have been on Spark (12.0.1) for about a month now, which is approximately around the time when the issue was reported in my org - could have been going on prior to that. Upgraded to 12.0.2 as well, still the same issues.


I’ve tried complete v2 rebuilds too, but the issue still persists and these filters cannot be properly applied.


Currently have someone looking into this, no word yet…


I have updated Skuid to version 12.0.6 and created a simplified V1 page from scratch to test the filters again. The page has only one model, which has 5 conditions:


0: Not Completed - Always on;
1: Sales Work Orders - filterable, default on;
2: Service Work Orders - filterable default off;
3: Except pendings - filterable default on;
4: Pendings only - filterable default off;

There are two filter options:


SalesWIP:


  • Enables: 1 and 3

  • Disables: 2 and 4

ServiceWIP:


  • Enables: 2 and 4

  • Disables: 1 and 3

The filter is still not applied until you refresh the page, but what caught my attention this time is the model conditions (accessed through the Javascript console immediately after selecting a filter) do reflect the correct settings:


After choosing “SalesWIP”:

0: {inactive: false}

1: {inactive: false}

2: {inactive: true}

3: {inactive: false}

4: {inactive: true}


After choosing “ServiceWIP”:

0: {inactive: false}

1: {inactive: true}

2: {inactive: false}

3: {inactive: true}

4: {inactive: false}


… which means the issue is not related to the way the conditions are configured, but to the way the conditions are applied to the SOQL query. Running skuid.$M(‘WorkOrder’).soql immediately after selecting a filter returns:


  SELECT RecordTypeId,
Name,
Expected_ship_date__c,
RecordType.DeveloperName,
Stage__c,
Status__c,
CurrentStage__c,
Id
FROM WorkOrder__c
WHERE (Stage__c not in ('Complete','Cancelled','Junked','In invoicing'))
ORDER BY Expected_ship_date__c
LIMIT 101

… where, again, only the “always on” condition is applied.


Here’s the simplified Skuid page XML:


<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true">
<models>
<model id="WorkOrder" query="true" createrowifnonefound="false" datasource="salesforce" sobject="WorkOrder__c" orderby="Expected_ship_date__c" limit="100">
<fields>
<field id="RecordTypeId"/>
<field id="Id"/>
<field id="Name"/>
<field id="Expected_ship_date__c"/>
<field id="RecordType.DeveloperName"/>
<field id="Stage__c"/>
<field id="Status__c"/>
<field id="CurrentStage__c"/>
</fields>
<conditions>
<condition type="multiple" value="" field="Stage__c" operator="not in" enclosevalueinquotes="true">
<values>
<value>Complete</value>
<value>Cancelled</value>
<value>Junked</value>
<value>In invoicing</value>
</values>
</condition>
<condition type="multiple" value="" field="RecordType.Name" fieldtargetobjects="RecordType" operator="in" enclosevalueinquotes="true" state="filterableon" inactive="false" name="SalesWIPOonly">
<values>
<value>Sale</value>
<value>Lease</value>
<value>Replacement</value>
<value>RaD_SaM</value>
</values>
</condition>
<condition type="multiple" value="" field="RecordType.Name" fieldtargetobjects="RecordType" operator="in" enclosevalueinquotes="true" state="filterableoff" inactive="true" name="ServiceWIPOnly">
<values>
<value>Calibration</value>
<value>Repair</value>
<value>Replacement</value>
<value>Upgrade</value>
</values>
</condition>
<condition type="multiple" value="" field="Stage__c" operator="not in" enclosevalueinquotes="true" state="filterableon" inactive="false" name="StageNOTPendingApproval">
<values>
<value>In receiving</value>
<value>Pending return</value>
<value>Pending approval</value>
</values>
</condition>
<condition type="multiple" value="" field="Stage__c" operator="in" enclosevalueinquotes="true" state="filterableoff" inactive="true" name="StageONLYPendingApproval">
<values>
<value>In receiving</value>
<value>Pending return</value>
<value>Pending approval</value>
</values>
</condition>
</conditions>
<actions/>
</model>
</models>
<components>
<skootable showconditions="true" showsavecancel="true" showerrorsinline="true" searchmethod="client" searchbox="true" showexportbuttons="false" hideheader="false" hidefooter="false" pagesize="all" alwaysresetpagination="false" createrecords="false" model="WorkOrder" mode="read" allowcolumnreordering="false" responsive="false" uniqueid="sk-1EuK-137" sortonclient="true" emptysearchbehavior="query" allowscrollbars="true" floatheader="true" cssclass="tight-checkboxes" heading="Leo's Skuid Test - V1 Page" instantfilters="true">
<fields>
<field id="Name" hideable="true" uniqueid="fi-1EuW-174"/>
<field id="Expected_ship_date__c" hideable="true" uniqueid="fi-1EuW-175"/>
<field id="Stage__c" hideable="true" uniqueid="fi-1Ez9-615"/>
<field id="RecordType.DeveloperName" hideable="true" uniqueid="fi-1EuW-176">
<label>Type</label>
</field>
<field id="Status__c" hideable="true" uniqueid="fi-1Euc-192"/>
</fields>
<rowactions/>
<massactions usefirstitemasdefault="true"/>
<views>
<view type="standard"/>
</views>
<filters>
<filter type="select" createfilteroffoption="false" affectcookies="true" autocompthreshold="25" conditionsource="manual" filtermethod="server" labelmode="no">
<sources>
<source type="manual" effectsbehavior="justdefault">
<options>
<option label="SalesWIP" type="complex">
<effects>
<effect action="deactivate" value="" condition="ServiceWIPOnly"/>
<effect action="activate" value="" condition="StageNOTPendingApproval"/>
<effect action="activate" value="" condition="SalesWIPOonly"/>
</effects>
</option>
<option label="ServiceWIP pendings only" type="complex">
<effects>
<effect action="deactivate" value="" condition="SalesWIPOonly"/>
<effect action="deactivate" value="" condition="StageNOTPendingApproval"/>
<effect action="activate" value="" condition="ServiceWIPOnly"/>
<effect action="activate" value="" condition="StageONLYPendingApproval"/>
</effects>
</option>
</options>
</source>
</sources>
</filter>
</filters>
<searchfields/>
</skootable>
</components>
<resources>
<labels/>
<javascript/>
<css>
<cssitem location="inline" name="tight-checkboxes" cachelocation="false">.tight-checkboxes table.nx-skootable-data inputxtype=checkbox] {
display: block;
margin: 0 auto;
}
</cssitem>
</css>
<actionsequences uniqueid="sk-1Et--117"/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>

Fixed on Spark 12.1.3 (May 14, 2019).


Reply