Brooklyn issue (10.0.4): Model with condition filterable default off returns records when condition is activated with a null value

  • 1
  • Problem
  • Updated 2 months ago
  • Solved
  • (Edited)
Brooklyn:
Model "test1":
query on page load:false
condition: id, =, single value, filterable default off

Model "test2"
customfield: null

Action:
set and activate condition id = {{$model.test2.data.0.customfield}}

requery Model "test1", it returns a record.


Rockaway:
requery Model "test1", it does NOT return a record.

We use model has rows to conditional render section. Now this is broken in Brooklyn.
Photo of jili@heidrick.com

jili@heidrick.com

  • 2,032 Points 2k badge 2x thumb

Posted 1 year ago

  • 1
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
Can you share the XML of the page that isn't working? Preferably one with standard objects instead of custom.
Photo of jili@heidrick.com

jili@heidrick.com

  • 2,032 Points 2k badge 2x thumb
<skuidpage showheader="true" personalizationmode="server" theme="Heidrick LD Theme_Clone" showsidebar="true">
    <models>
        <model id="NewContact_Include" sobject="Contact" doclone="" createrowifnonefound="true" query="false" limit="1" datasource="salesforce">
            <fields>
                <field id="FirstName"/>
                <field id="LastName"/>
                <field id="AccountId"/>
                <field id="Account.Name"/>
                <field id="Email_Other__c"/>
                <field id="Email_Personal__c"/>
                <field id="Email"/>
                <field id="Preferred_Email__c"/>
                <field id="Preferred_Phone__c"/>
                <field id="CurrencyIsoCode"/>
                <field id="Phone"/>
                <field id="MobilePhone"/>
                <field id="HomePhone"/>
                <field id="Title"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="NewCompany_Include" sobject="Account" doclone="" createrowifnonefound="false" query="false" limit="1" datasource="salesforce">
            <fields>
                <field id="BillingCountry"/>
                <field id="Name"/>
                <field id="Primary_Country__c"/>
                <field id="Primary_Country__r.Name"/>
                <field id="BillingState"/>
                <field id="Key_Products_and_Services__c"/>
                <field id="StateLookup" label="State" uionly="true" displaytype="REFERENCE" targetobjects="State__c"/>
                <field id="Location_Type__c"/>
                <field id="BillingCity"/>
                <field id="BillingStreet"/>
                <field id="BillingPostalCode"/>
                <field id="DunsNumber"/>
                <field id="Description"/>
                <field id="Industry"/>
                <field id="NumberOfEmployees"/>
                <field id="SicDesc"/>
                <field id="TickerSymbol"/>
                <field id="Website"/>
                <field id="Phone"/>
                <field id="Fifth_NAICS__c"/>
                <field id="Fifth_NAICS_Description__c"/>
                <field id="Fourth_NAICS__c"/>
                <field id="Fourth_NAICS_Description__c"/>
                <field id="First_NAICS__c"/>
                <field id="First_NAICS_Description__c"/>
                <field id="Second_NAICS__c"/>
                <field id="Second_NAICS_Description__c"/>
                <field id="Sixth_NAICS__c"/>
                <field id="Sixth_NAICS_Description__c"/>
                <field id="Third_NAICS__c"/>
                <field id="Third_NAICS_Description__c"/>
                <field id="ShippingStreet"/>
                <field id="Jigsaw"/>
                <field id="AnnualRevenue"/>
                <field id="Ownership__c"/>
                <field id="Phone_Main__c"/>
                <field id="CleanStatus"/>
                <field id="ShippingCity"/>
                <field id="ShippingPostalCode"/>
                <field id="ShippingState"/>
                <field id="ShippingCountry"/>
                <field id="DandbCompanyId"/>
                <field id="DandbCompany.Name"/>
                <field id="CurrencyIsoCode" displaytype="TEXT" overridemetadata="true" ogdisplaytype="PICKLIST" defaultValue="USD"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="DupeAccountRecordSet" sobject="DuplicateRecordItem" createrowifnonefound="false" query="false" limit="1" datasource="salesforce">
            <fields>
                <field id="DuplicateRecordSetId"/>
                <field id="DuplicateRecordSet.Name"/>
                <field id="RecordId"/>
                <field id="Record.Name"/>
            </fields>
            <conditions>
                <condition type="fieldvalue" name="RecordId" value="" enclosevalueinquotes="true" field="RecordId" operator="=" state="filterableoff" inactive="true" novaluebehavior="noquery" mergefield="Id"/>
            </conditions>
            <actions/>
        </model>
    </models>
    <components>
        <basicfieldeditor uniqueid="sk-1Yg_F3-100" model="NewContact_Include" layout="" mode="edit" showheader="true" showsavecancel="false">
            <columns>
                <column width="33.3%">
                    <sections>
                        <section title="Contact Information" showheader="false" collapsible="no">
                            <fields>
                                <field type="" id="FirstName" required="true" valuehalign="" uniqueid="sk-3pZM-278"/>
                                <field type="" id="LastName" valuehalign="" uniqueid="sk-3pZM-281"/>
                                <field type="" id="AccountId" required="true" valuehalign="" optionsource="" tokenizesearch="true" searchtemplate="{{Name}} {{#Client_Number__c}} \u2014{{Client_Number__c}}{{/Client_Number__c}} {{#Location_Type_Text__c}}({{Location_Type_Text__c}}){{/Location_Type_Text__c}} \u2014{{#ShippingCity}}{{ShippingCity}},{{/ShippingCity}}{{#ShippingState}} {{ShippingState}}, {{/ShippingState}}{{ShippingCountry}}" uniqueid="sk-3pZM-284">
                                    <searchfields soslfields="Sidebar Fields" defaultordering="true" usesosl="true">
                                        <searchfield field="Name" query="false" return="true" show="true"/>
                                        <searchfield field="Ultimate_Parent_Company__c" operator="=" query="false" return="true" show="true"/>
                                        <searchfield field="Location_Type_Text__c" operator="starts with" query="true" return="true" show="true"/>
                                        <searchfield field="ShippingCountry" query="false" return="true" show="true">
                                            <label>Country</label>
                                        </searchfield>
                                        <searchfield field="ShippingState" query="false" return="true" show="true">
                                            <label>State</label>
                                        </searchfield>
                                        <searchfield field="ShippingCity" query="false" return="true" show="true">
                                            <label>City</label>
                                        </searchfield>
                                        <searchfield field="Client_Number__c" query="false" return="true" show="true"/>
                                        <searchfield field="Ultimate_Parent_Company__r.Name" operator="contains" query="false" return="true" show="false"/>
                                    </searchfields>
                                </field>
                                <field type="" id="Title" required="true" valuehalign="" uniqueid="sk-3pZM-287"/>
                            </fields>
                        </section>
                    </sections>
                </column>
                <column width="33.3%">
                    <sections>
                        <section title="Contact Information" showheader="false" collapsible="no">
                            <fields>
                                <field type="" id="Preferred_Email__c" valuehalign="" uniqueid="sk-3pZM-293">
                                    <label>Email Type</label>
                                </field>
                                <field readonly="false" type="" id="Email" valuehalign="" showhelp="true" uniqueid="sk-3pZM-296">
                                    <renderconditions logictype="and" onhidedatabehavior="keep">
                                        <rendercondition type="fieldvalue" value="Email: Work" enclosevalueinquotes="true" field="Preferred_Email__c" nosourcerowbehavior="deactivate" sourcetype="fieldvalue" fieldmodel="NewContact_Include" operator="="/>
                                    </renderconditions>
                                    <enableconditions/>
                                </field>
                                <field readonly="false" type="" id="Email_Personal__c" required="false" valuehalign="" uniqueid="sk-3pZM-299">
                                    <renderconditions logictype="and" onhidedatabehavior="keep">
                                        <rendercondition type="fieldvalue" value="Email: Personal" enclosevalueinquotes="true" field="Preferred_Email__c" nosourcerowbehavior="deactivate" sourcetype="fieldvalue" fieldmodel="NewContact_Include" operator="="/>
                                    </renderconditions>
                                    <enableconditions/>
                                </field>
                                <field readonly="true" type="" id="Email_Other__c" valuehalign="" uniqueid="sk-3pZM-302">
                                    <renderconditions logictype="and" onhidedatabehavior="keep">
                                        <rendercondition type="fieldvalue" value="Email: Other" enclosevalueinquotes="true" field="Preferred_Email__c" sourcetype="fieldvalue" fieldmodel="Contact" operator="="/>
                                    </renderconditions>
                                    <enableconditions/>
                                </field>
                            </fields>
                            <renderconditions logictype="and"/>
                        </section>
                        <section title="Phone" showheader="false" collapsible="no">
                            <fields>
                                <field type="" id="Preferred_Phone__c" valuehalign="" uniqueid="sk-3pZM-307">
                                    <label>Phone Type</label>
                                </field>
                                <field type="" id="Phone" valuehalign="" uniqueid="sk-3pZM-310">
                                    <renderconditions logictype="and" onhidedatabehavior="keep">
                                        <rendercondition type="fieldvalue" value="Phone: Work" enclosevalueinquotes="true" field="Preferred_Phone__c" nosourcerowbehavior="deactivate" sourcetype="fieldvalue" fieldmodel="NewContact_Include" operator="="/>
                                    </renderconditions>
                                    <enableconditions/>
                                </field>
                                <field type="" id="MobilePhone" valuehalign="" uniqueid="sk-3pZM-313">
                                    <renderconditions logictype="and" onhidedatabehavior="keep">
                                        <rendercondition type="fieldvalue" value="Phone: Mobile" enclosevalueinquotes="true" field="Preferred_Phone__c" nosourcerowbehavior="deactivate" sourcetype="fieldvalue" fieldmodel="NewContact_Include" operator="="/>
                                    </renderconditions>
                                    <enableconditions/>
                                </field>
                                <field type="" id="HomePhone" valuehalign="" uniqueid="sk-3pZM-316">
                                    <renderconditions logictype="and" onhidedatabehavior="keep">
                                        <rendercondition type="fieldvalue" value="Phone: Home" enclosevalueinquotes="true" field="Preferred_Phone__c" nosourcerowbehavior="deactivate" sourcetype="fieldvalue" fieldmodel="NewContact_Include" operator="="/>
                                    </renderconditions>
                                    <enableconditions/>
                                </field>
                            </fields>
                        </section>
                    </sections>
                </column>
                <column width="33.3%">
                    <sections>
                        <section title="New Section" showheader="false" collapsible="no">
                            <fields/>
                        </section>
                    </sections>
                </column>
            </columns>
        </basicfieldeditor>
        <pagetitle uniqueid="sk-Weyur-391" model="NewContact_Include" cssclass="leftButton">
            <actions>
                <action type="multi" label="Continue" icon="sk-icon-arrow-right" uniqueid="sk-3pZM-325">
                    <renderconditions logictype="and"/>
                    <enableconditions logictype="and">
                        <enablecondition type="blank" value="null" enclosevalueinquotes="false" field="AccountId" sourcetype="fieldvalue" fieldmodel="NewContact_Include" operator="!="/>
                        <enablecondition type="blank" value="null" enclosevalueinquotes="false" field="FirstName" sourcetype="fieldvalue" fieldmodel="NewContact_Include" operator="!="/>
                        <enablecondition type="blank" value="null" enclosevalueinquotes="false" field="LastName" sourcetype="fieldvalue" fieldmodel="NewContact_Include" operator="!="/>
                        <enablecondition type="blank" value="null" enclosevalueinquotes="false" field="Title" sourcetype="fieldvalue" fieldmodel="NewContact_Include" operator="!="/>
                        <condition type="blank" value="null" enclosevalueinquotes="false" field="FirstName" sourcetype="fieldvalue" fieldmodel="NewContact_Include" operator="!="/>
                        <condition type="blank" value="null" enclosevalueinquotes="false" field="LastName" sourcetype="fieldvalue" fieldmodel="NewContact_Include" operator="!="/>
                        <condition type="blank" value="null" enclosevalueinquotes="false" field="AccountId" sourcetype="fieldvalue" fieldmodel="NewContact_Include" operator="!="/>
                        <condition type="blank" value="null" enclosevalueinquotes="false" field="Title" sourcetype="fieldvalue" fieldmodel="NewContact_Include" operator="!="/>
                    </enableconditions>
                    <actions>
                        <action type="blockUI" message="Checking for Duplicates"/>
                        <action type="setCondition" snippet="updateDupeAccountRecordSetCondition" model="DupeAccountRecordSet" condition="RecordId" value="{{$Model.NewCompany_Include.data.0.Id}}"/>
                        <action type="custom" snippet="waitSecs"/>
                        <action type="requeryModels" behavior="standard" model="NewContact_Include">
                            <models>
                                <model>DupeAccountRecordSet</model>
                            </models>
                            <onerroractions>
                                <action type="blockUI" message="There was an error" timeout="3000"/>
                            </onerroractions>
                        </action>
                        <action type="unblockUI"/>
                    </actions>
                    <hotkeys/>
                </action>
              
        </actions>
        <maintitle/>
        <subtitle/>
    </pagetitle>
    <skootable showconditions="true" showsavecancel="true" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" hideheader="false" hidefooter="false" pagesize="10" alwaysresetpagination="false" createrecords="true" model="DupeAccountRecordSet" buttonposition="" mode="read" allowcolumnreordering="true" responsive="true" uniqueid="sk-3zNo-1082">
        <fields>
            <field id="RecordId" hideable="true" uniqueid="fi-3zOU-1900"/>
        </fields>
        <rowactions>
            <action type="edit"/>
            <action type="delete"/>
        </rowactions>
        <massactions usefirstitemasdefault="true">
            <action type="massupdate"/>
            <action type="massdelete"/>
        </massactions>
        <views>
            <view type="standard"/>
        </views>
    </skootable>
</components>
<resources>
    <labels/>
    <javascript>
        <jsitem name="waitSecs" location="inlinesnippet" cachelocation="false">var params = arguments[0],
$ = skuid.$,
    dfd = $.Deferred();

var a = "world";
setTimeout(function(){
    dfd.resolve();
}, 3000);

return dfd.promise();
</jsitem>
        <jsitem location="inlinesnippet" name="updateDupeAccountRecordSetCondition" cachelocation="false">var params = arguments[0],
$ = skuid.$;

var dupeAccountModel = skuid.$M('DupeAccountRecordSet'),
    newCompanyModel = skuid.$M('NewCompany_Include'),
    newCompanyRow = model.getFirstRow();
    
if(newCompanyModel &amp;&amp; newCompanyRow) {
    console.log('Setting RecordId for DupeAccountRecordSet');
    var dupeAccountModelCondition = dupeAccountModel.getConditionByName('RecordId');
    dupeAccountModel.setCondition(dupeAccountModelCondition, newCompanyRow.Id);
}</jsitem>
    </javascript>
    <css>
        <cssitem name="newcss" location="inline" cachelocation="false">.companyNameHidden {
    display: none;
}

/*Float Button Left*/
div .leftButton .nx-header-right {
    float: left;
}

.nx-editor-header input.searchbox {
    width: 400px;
}

.fieldFakeRequired .nx-field&gt;.ui-autocomplete-input {
    border: 2px solid rgb(221, 0, 0);
}

.fieldFakeRequired .nx-field textarea {
    border: 2px solid rgb(221, 0, 0);
}
</cssitem>
    </css>
    <actionsequences/>
</resources>
<styles>
    <styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>

(Edited)
Photo of jili@heidrick.com

jili@heidrick.com

  • 2,032 Points 2k badge 2x thumb


The bottom model should be empty.

Steps: enter values for all 4 fields on the left panel. Click on Continue, which sets the model conditions to Id = null.

SELECT CreatedDate FROM DuplicateRecordSet WHERE Id = null

should return no data. Skuid is returning 2 records.


This issue exists in Millau 11.2.9 too. Can you please investigate? Thanks!
Photo of jili@heidrick.com

jili@heidrick.com

  • 2,032 Points 2k badge 2x thumb
I fixed the issue by using a merge syntax conditional around {{$model.test2.data.0.customfield}}. Is this a known issue and acceptable fix?
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
Merge Syntax is supported. This is not a known issue but rather looks like a traditional this is how it's done. Certainly acceptable. If you're thinking it isn't, I'll take a look at your XML with the Merge Syntax conditional added and see.