Table filters are not being applied after Skuid update

  • 1
  • Problem
  • Updated 2 weeks ago
  • In Progress
  • (Edited)
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 [...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 [...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?
Photo of Leonardo Costa

Leonardo Costa

  • 122 Points 100 badge 2x thumb

Posted 3 weeks ago

  • 1
Photo of Mike Dwyer

Mike Dwyer, Champion

  • 3,604 Points 3k badge 2x thumb
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,758 Points 10k badge 2x thumb
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
Photo of Leonardo Costa

Leonardo Costa

  • 122 Points 100 badge 2x thumb
Hi Bill,

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

<complexType name="WorkOrder__c">
    <complexContent>
        <extension base="ens:sObject">
            <sequence>
                <element name="Account__c" nillable="true" minOccurs="0" type="tns:ID"/>
                <element name="Account__r" nillable="true" minOccurs="0" type="ens:Account"/>
                <element name="ActualLeadTime__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="ActualShipDate__c" nillable="true" minOccurs="0" type="xsd:date"/>
                <element name="Advance_Payment__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="Age__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="AssessmentReports__r" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="AttachedContentDocuments" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="AttachedContentNotes" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="Attachments" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="Barcode__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="BillingCountry__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="BillingType__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="Billing_notes__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="CalCertOK__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="CalibrationDueDate__c" nillable="true" minOccurs="0" type="xsd:date"/>
                <element name="CannotSlipLabel__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="CannotSlip__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="CaseNumber__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="CaseStage__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="CaseSubject__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="Case__c" nillable="true" minOccurs="0" type="tns:ID"/>
                <element name="Case__r" nillable="true" minOccurs="0" type="ens:Case"/>
                <element name="Cases__r" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="CombinedAttachments" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="CommitDate__c" nillable="true" minOccurs="0" type="xsd:date"/>
                <element name="ConnectionReceived" nillable="true" minOccurs="0" type="ens:PartnerNetworkConnection"/>
                <element name="ConnectionReceivedId" nillable="true" minOccurs="0" type="tns:ID"/>
                <element name="ConnectionSent" nillable="true" minOccurs="0" type="ens:PartnerNetworkConnection"/>
                <element name="ConnectionSentId" nillable="true" minOccurs="0" type="tns:ID"/>
                <element name="Contact__c" nillable="true" minOccurs="0" type="tns:ID"/>
                <element name="Contact__r" nillable="true" minOccurs="0" type="ens:Contact"/>
                <element name="ContentDocumentLinks" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="CreatedBy" nillable="true" minOccurs="0" type="ens:User"/>
                <element name="CreatedById" nillable="true" minOccurs="0" type="tns:ID"/>
                <element name="CreatedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
                <element name="CurrencyIsoCode" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="CurrentStage__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="CustomerPO__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="CustomsInformation__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="DateTariffCleared__c" nillable="true" minOccurs="0" type="xsd:date"/>
                <element name="DaysUntilShipment__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="Days_from_TFC_to_shipment__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="Description__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="DuplicateRecordItems" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="Emails" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="EngineeringJIRAIssue__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="EventRelations" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="ExpectedLeadTime__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="ExpectedSlipAmount__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="ExpectedTFCDate__c" nillable="true" minOccurs="0" type="xsd:date"/>
                <element name="ExpectedTFCNotes__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="Expected_ship_date__c" nillable="true" minOccurs="0" type="xsd:date"/>
                <element name="FedEx_Shipments__r" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="FeedSubscriptionsForEntity" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="HasUnresolvedShortages__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="Histories" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="HoldForShipping__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="ImportedIntoQuickBooks__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="IncludedInShipment__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="InstrumentCount__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="InternalComments__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="InvoiceReference__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="IsDeleted" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="JIRAIssues__r" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="JSDIssue__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="LabourPerformed__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="LastModifiedBy" nillable="true" minOccurs="0" type="ens:User"/>
                <element name="LastModifiedById" nillable="true" minOccurs="0" type="tns:ID"/>
                <element name="LastModifiedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
                <element name="LastModifiedDelta__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="LastReferencedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
                <element name="LastViewedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
                <element name="LookedUpFromActivities" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="ManualShippingCost__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="MaterialsUsed__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="Name" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="Notes" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="NotesAndAttachments" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="OpportunityName__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="Opportunity__c" nillable="true" minOccurs="0" type="tns:ID"/>
                <element name="Opportunity__r" nillable="true" minOccurs="0" type="ens:Opportunity"/>
                <element name="Opportunity_close_date__c" nillable="true" minOccurs="0" type="xsd:date"/>
                <element name="Order_acknowledgement__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="OriginalLeadTime__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="Owner" nillable="true" minOccurs="0" type="ens:Name"/>
                <element name="OwnerId" nillable="true" minOccurs="0" type="tns:ID"/>
                <element name="ProQuote_ref__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="ProcessInstances" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="ProcessSteps" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="ProductionSlipAmount__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="QC_performed__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="QtyAccessoriesOK__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="QtyInstOK__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="RecordActionHistories" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="RecordActions" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="RecordAssociatedGroups" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="RecordType" nillable="true" minOccurs="0" type="ens:RecordType"/>
                <element name="RecordTypeId" nillable="true" minOccurs="0" type="tns:ID"/>
                <element name="RecordTypeMatchesOpportunity__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="Require_shipping_quotation__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="RequiredAP__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="RequiredCC__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="RequiredLC__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="RequiredTariff__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="RequiresCC__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="RequiresLC__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="RequiresSalesAttention__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="RequiresShippingAttention__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="Requires_Tariff__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="ResolvedShortages__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="SCM_Jiras__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="SCM_status__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="STOP_SHIP__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="SensorsOK__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="SerialNumbersOK__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="ServiceReports__r" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="Shares" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="Ship_month__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="ShippingCarrierAccount__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="ShippingCarrier__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="ShippingCity__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="ShippingCompany__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="ShippingContact__c" nillable="true" minOccurs="0" type="tns:ID"/>
                <element name="ShippingContact__r" nillable="true" minOccurs="0" type="ens:Contact"/>
                <element name="ShippingCost__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="ShippingCountry__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="ShippingDimensions__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="ShippingEmail__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="ShippingInstructions__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="ShippingName__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="ShippingPhone__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="ShippingPostalCode__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="ShippingResponsibility__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="ShippingState__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="ShippingStreet__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="ShortagesCount__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="SlipAmount__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="SlipReasonCount__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="SlipReasons__r" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="Slip_reason__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="SpecialInstructions__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="Stage__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="Status__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="SupportKitsIncluded__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="SystemModstamp" nillable="true" minOccurs="0" type="xsd:dateTime"/>
                <element name="TaskRelations" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="TopicAssignments" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="Tracking_number__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="TypeInstrOK__c" nillable="true" minOccurs="0" type="xsd:boolean"/>
                <element name="Type__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="UPS_Shipments__r" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="UserRecordAccess" nillable="true" minOccurs="0" type="ens:UserRecordAccess"/>
                <element name="WOLineCount__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="WOLinesInvalid__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="WOLinesValid__c" nillable="true" minOccurs="0" type="xsd:double"/>
                <element name="WONumberOnly__c" nillable="true" minOccurs="0" type="xsd:string"/>
                <element name="WOStageIntervals__r" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="WorkOrderLines__r" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="WorkOrderShortages__r" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="Work_Order_Instrument_Junctions__r" nillable="true" minOccurs="0" type="tns:QueryResult"/>
                <element name="ZendeskTicket__c" nillable="true" minOccurs="0" type="tns:ID"/>
                <element name="ZendeskTicket__r" nillable="true" minOccurs="0" type="ens:Zendesk__Zendesk_Ticket__c"/>
            </sequence>
        </extension>
    </complexContent>
</complexType>
(Edited)
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,758 Points 10k badge 2x thumb
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
Photo of Leonardo Costa

Leonardo Costa

  • 122 Points 100 badge 2x thumb
Sorry, my bad... Here's the Work Order model from the Skuid page:

<model id="WorkOrder" limit="" query="true" createrowifnonefound="false" sobject="WorkOrder__c" orderby="Expected_ship_date__c" doclone="" datasource="salesforce">
    <fields>
        <field id="Advance_Payment__c"/>
        <field id="Description__c"/>
        <field id="Expected_ship_date__c"/>
        <field id="Requires_Tariff__c"/>
        <field id="Stage__c"/>
        <field id="Status__c"/>
        <field id="Name"/>
        <field id="Age__c"/>
        <field id="CannotSlip__c"/>
        <field id="Slip_reason__c"/>
        <field id="RecordTypeId"/>
        <field id="RecordType.Name"/>
        <field id="Account__r.Name"/>
        <field id="RecordType.SobjectType"/>
        <field id="SCM_status__c" overridemetadata="false" ogdisplaytype="TEXTAREA" displaytype="TEXTAREA"/>
        <field id="WorkOrderLines__r" type="childRelationship" limit="10">
            <fields>
                <field id="Name"/>
                <field id="Notes__c"/>
                <field id="ProductCode__c"/>
                <field id="PressureRating__c"/>
                <field id="ProductName__c"/>
                <field id="Quantity__c"/>
            </fields>
        </field>
        <field id="Contact__r.Name"/>
        <field id="Opportunity__r.Amount"/>
        <field id="Opportunity__r.Amount_gross__c"/>
        <field id="Opportunity__r.Amount_net__c"/>
        <field id="HoldForShipping__c"/>
        <field id="CommitDate__c"/>
        <field id="SlipAmount__c"/>
        <field id="ExpectedSlipAmount__c"/>
        <field id="ExpectedTFCNotes__c"/>
        <field id="ExpectedTFCDate__c"/>
        <field id="SpecInst" uionly="true" displaytype="FORMULA" readonly="true" ogdisplaytype="TEXT" defaultvaluetype="fieldvalue" returntype="BOOLEAN">
            <formula>IF(ISBLANK({{SpecialInstructions__c}}),false,true)</formula>
        </field>
        <field id="SpecialInstructions__c"/>
        <field id="EngineeringJIRAIssue__c"/>
        <field id="Account__r.BillingCountry"/>
        <field id="HasUnresolvedShortages__c"/>
    </fields>
    <conditions>
        <condition type="multiple" value="" field="Stage__c" operator="not in" enclosevalueinquotes="true">
            <values>
                <value>Cancelled</value>
                <value>Complete</value>
                <value>In invoicing</value>
                <value>Junked</value>
            </values>
        </condition>
        <condition type="multiple" value="" state="filterableon" inactive="false" field="RecordTypeId" operator="in" enclosevalueinquotes="true" name="SalesWIPOonly">
            <values>
                <value>Sale</value>
                <value>Lease</value>
                <value>Replacement</value>
                <value>RaD_SaM</value>
            </values>
        </condition>
        <condition type="multiple" value="" field="RecordTypeId" 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" state="filterableoff" inactive="true" name="StageNOTPendingApproval" operator="not in" enclosevalueinquotes="true">
            <values>
                <value>In receiving</value>
                <value>Pending return</value>
                <value>Pending approval</value>
            </values>
        </condition>
        <condition type="multiple" value="" field="Stage__c" state="filterableoff" inactive="true" name="StageONLYPendingApproval" operator="in" enclosevalueinquotes="true">
            <values>
                <value>Pending approval</value>
                <value>In receiving</value>
                <value>Pending return</value>
            </values>
        </condition>
        <condition type="fieldvalue" value="MTS" enclosevalueinquotes="true" field="RecordTypeId" state="filterableoff" inactive="true" name="MTSWIPOnly"/>
        <condition type="fieldvalue" value="RaD_SaM" enclosevalueinquotes="true" field="RecordTypeId" operator="=" state="filterableoff" inactive="true" name="RaDSaMWIPOnly"/>
    </conditions>
    <groupby method="simple"/>
    <actions/>
</model>
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,758 Points 10k badge 2x thumb
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