Queue Retaining Records with subsequent Clicks (interactions)

Chandra VChandra V Member
edited February 2019 in Problems
We have a 2 level nested queue to provide our users a hierarchy selector to narrow products for our CPQ system.  With Brooklyn, the queue is duplicating values displayed in the 2nd queue and we have no way of getting rid of them that we have found.  The model only has the rows we expect (1 of each) but the display in the queue is duplicated.

Example:
click an Account (queue 1) and you see the related Contacts (queue 2)

image

Click another Account, and you see the Contacts for this account.  (so far so good)
image

Click back to the first Account and now all the contacts are duplicated. (NOT good)
image

We have the query on Interaction actions of queue 1 to "standard - completely replace data".  We have also tried to add an action "remove all rows from model (contacts) but that doesn't work either.  Also tried running a snippet with an emptyData action in it.
image
We've replaced Queue 2 with a pop up and confirmed that the model has the correct records (no duplicates) but the queue is retaining them somehow.


Is this a bug that can be looked at?  or someone can help me figure this out?

Sample page xml:

<skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true" personalizationmode="server">   <models>
      <model id="Accounts" limit="20" query="true" createrowifnonefound="false" sobject="Account" doclone="" type="" datasource="salesforce" processonclient="true">
         <fields>
            <field id="Id"/>
            <field id="Name"/>
         </fields>
         <conditions logic=""/>
         <actions/>
      </model>
      <model id="Contacts" limit="" query="false" createrowifnonefound="false" sobject="Contact" doclone="" type="" datasource="salesforce" processonclient="true">
         <fields>
            <field id="Name"/>
            <field id="AccountId"/>
            <field id="Account.Name"/>
         </fields>
         <conditions>
<condition type="fieldvalue" value="" enclosevalueinquotes="true" field="AccountId" state="filterableoff" inactive="true" name="AccountId"/>
</conditions>
         <actions/>
      </model>
   </models>
   <components>
      <panelset type="standard" scroll="" uniqueid="sk-3RmbJV-92">
         <panels>
            <panel type="left" width="350">
               <components>
                  <queue tagrendertype="template" querystring="id={{Id}}" defaultitemparameter="id" searchbox="true" tokenizesearch="true" model="Accounts" title="Accounts" searchmethod="server" emptysearchbehavior="query" itemicon="sk-icon-account-profile" uniqueid="sk-3RmbJV-93">
                     <rendertemplate>{{{Name}}}</rendertemplate>
                     <searchfields/>
                     
                  <interactions>
<interaction type="tap">
                        
                     <action type="custom" snippet="emptyModel"/>
<action type="setCondition" model="Contacts" condition="AccountId" value="{{Id}}"/>
<action type="requeryModel" model="Contacts" behavior="standard"/>
<action type="drawer">
                           <drawer title="Drawer Area" width="90%" closehandle="true">
                              <components>
                                 <queue tagrendertype="template" querystring="id={{Id}}" searchbox="true" tokenizesearch="true" model="Contacts" uniqueid="" module="SkuidCRM">
                                    <conditions>
                                       <condition type="contextrow" field="AccountId" mergefield="Id" operator="="/>
                                    </conditions>
                                    <rendertemplate>{{{Name}}}</rendertemplate>
                                    <renderconditions logictype="and"/>
                                 <interactions>
<interaction type="tap">
    <action type="updateIncludePanel" pagename="ContactDetail" panelid="contactpage" querystring="id={{Id}}" module="" parameter="id"/>
</interaction>
</interactions>
</queue>
                              </components>
                              <beforeload>
                                 
                              </beforeload>
                           </drawer>
                        </action>
</interaction>
</interactions>
<renderconditions logictype="and"/>
</queue>
               </components>
            </panel>
            <panel>
               <components>
                  
               </components>
            </panel>
         </panels>
      </panelset>
   </components>
   <resources>
      <labels/>
      <javascript>
<jsitem location="inlinesnippet" name="emptyModel" cachelocation="false">var params = arguments[0],
$ = skuid.$;


var ContactModel = skuid.model.getModel('Contacts');

alert("running the empty snippet");

ContactModel.emptyData();
</jsitem>
</javascript>
      <css/>
   </resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>





Answers

  • Gregory SmithGregory Smith Skuad ✭✭
    edited February 2017
    I pasted the XML above, but the queue only had a JS snippet that emptied the Contacts model.  Is there another version?
  • Chandra VChandra V Member
    edited February 2019
    I removed the snippet from the Queue Interactions.  Now you should only see the "Activate and set model condition" and Query Contact model actions.

    <skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true" personalizationmode="server">   <models>
          <model id="Accounts" limit="20" query="true" createrowifnonefound="false" sobject="Account" doclone="" type="" datasource="salesforce" processonclient="true">
             <fields>
                <field id="Id"/>
                <field id="Name"/>
             </fields>
             <conditions logic=""/>
             <actions/>
          </model>
          <model id="Contacts" limit="" query="false" createrowifnonefound="false" sobject="Contact" doclone="" type="" datasource="salesforce" processonclient="true">
             <fields>
                <field id="Name"/>
                <field id="AccountId"/>
                <field id="Account.Name"/>
             </fields>
             <conditions>
    <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="AccountId" state="filterableoff" inactive="true" name="AccountId"/>
    </conditions>
             <actions/>
          </model>
       </models>
       <components>
          <panelset type="standard" scroll="" uniqueid="sk-3RmbJV-92">
             <panels>
                <panel type="left" width="350">
                   <components>
                      <queue tagrendertype="template" querystring="id={{Id}}" defaultitemparameter="id" searchbox="true" tokenizesearch="true" model="Accounts" title="Accounts" searchmethod="server" emptysearchbehavior="query" itemicon="sk-icon-account-profile" uniqueid="sk-3RmbJV-93">
                         <rendertemplate>{{{Name}}}</rendertemplate>
                         <searchfields/>
                         
                      <interactions>
    <interaction type="tap">
                            
                         <action type="setCondition" model="Contacts" condition="AccountId" value="{{Id}}"/>
    <action type="requeryModel" model="Contacts" behavior="standard"/>
    <action type="drawer">
                               <drawer title="Drawer Area" width="90%" closehandle="true">
                                  <components>
                                     <queue tagrendertype="template" querystring="id={{Id}}" searchbox="true" tokenizesearch="true" model="Contacts" uniqueid="" module="SkuidCRM">
                                        <conditions>
                                           <condition type="contextrow" field="AccountId" mergefield="Id" operator="="/>
                                        </conditions>
                                        <rendertemplate>{{{Name}}}</rendertemplate>
                                        <renderconditions logictype="and"/>
                                     <interactions/>
    </queue>
                                  </components>
                                  <beforeload>
                                     
                                  </beforeload>
                               </drawer>
                            </action>
    </interaction>
    </interactions>
    <renderconditions logictype="and"/>
    </queue>
                   </components>
                </panel>
                <panel>
                   <components>
                      
                   </components>
                </panel>
             </panels>
          </panelset>
       </components>
       <resources>
          <labels/>
          <javascript>
    <jsitem location="inlinesnippet" name="emptyModel" cachelocation="false">var params = arguments[0],
    $ = skuid.$;


    var ContactModel = skuid.model.getModel('Contacts');

    alert("running the empty snippet");

    ContactModel.emptyData();
    </jsitem>
    </javascript>
          <css/>
       </resources>
    <styles>
    <styleitem type="background" bgtype="none"/>
    </styles>
    </skuidpage>




  • Gregory SmithGregory Smith Skuad ✭✭
    edited February 2019
    That didn't seem to have the interactions either, but I mocked it up.  The answer is setting the context of the 2nd queue.  See if this is close:

    <skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true" personalizationmode="server">    <models>
            <model id="Accounts" limit="20" query="true" createrowifnonefound="false" sobject="Account" doclone="" type="" datasource="salesforce" processonclient="true">
                <fields>
                    <field id="Id"/>
                    <field id="Name"/>
                </fields>
                <conditions logic=""/>
                <actions/>
            </model>
            <model id="Contacts" limit="" query="false" createrowifnonefound="false" sobject="Contact" doclone="" type="" datasource="salesforce" processonclient="true" adapter="salesforce">
                <fields>
                    <field id="Name"/>
                    <field id="AccountId"/>
                    <field id="Account.Name"/>
                </fields>
                <conditions>
                    <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="AccountId" state="filterableoff" inactive="true" name="AccountId"/>
                </conditions>
                <actions/>
            </model>
        </models>
        <components>
            <panelset type="standard" scroll="" uniqueid="sk-3RmbJV-92">
                <panels>
                    <panel type="left" width="350">
                        <components>
                            <queue tagrendertype="template" querystring="id={{Id}}" defaultitemparameter="id" searchbox="true" tokenizesearch="true" model="Accounts" title="Accounts" searchmethod="server" emptysearchbehavior="query" itemicon="sk-icon-account-profile" uniqueid="sk-3RmbJV-93" clickactiontype="multi">
                                <rendertemplate>{{{Name}}}</rendertemplate>
                                <searchfields/>
                                <interactions>
                                    <interaction type="tap">
                                        <action type="setCondition" model="Contacts" condition="AccountId" value="{{Id}}"/>
                                        <action type="requeryModel" model="Contacts" behavior="standard"/>
                                        <action type="drawer">
                                            <drawer title="Drawer Area" width="90%" closehandle="true">
                                                <components>
                                                    <queue tagrendertype="template" querystring="id={{Id}}" searchbox="true" tokenizesearch="true" model="Contacts" uniqueid="" module="SkuidCRM">
                                                        <conditions>
                                                            <condition type="contextrow" field="AccountId" mergefield="Id" operator="="/>
                                                        </conditions>
                                                        <rendertemplate>{{{Name}}}</rendertemplate>
                                                        <renderconditions logictype="and"/>
                                                        <interactions/>
                                                    </queue>
                                                </components>
                                                <beforeload/>
                                            </drawer>
                                        </action>
                                    </interaction>
                                </interactions>
                                <renderconditions logictype="and"/>
                                <actions>
                                    <action type="setCondition" model="Contacts" condition="AccountId" value="{{Id}}"/>
                                    <action type="requeryModel" model="Contacts" behavior="loadmore"/>
                                    <action type="drawer">
                                        <drawer title="Drawer Area" width="90%" closehandle="true">
                                            <components>
                                                <queue tagrendertype="template" querystring="id={{Id}}" defaultitemparameter="id" clickactiontype="updatepanel" searchbox="false" tokenizesearch="true" model="Contacts" uniqueid="sk-3c734n-107" instantfilters="false" searchmethod="server">
                                                    <rendertemplate>{{{Name}}}</rendertemplate>
                                                    <searchfields/>
                                                    <conditions>
                                                        <condition type="contextrow" field="AccountId" mergefield="Id" operator="="/>
                                                    </conditions>
                                                </queue>
                                            </components>
                                        </drawer>
                                    </action>
                                </actions>
                            </queue>
                        </components>
                    </panel>
                    <panel>
                        <components/>
                    </panel>
                </panels>
            </panelset>
        </components>
        <resources>
            <labels/>
            <javascript>
                <jsitem location="inlinesnippet" name="emptyModel" cachelocation="false">var params = arguments[0],
    $ = skuid.$;


    var ContactModel = skuid.model.getModel('Contacts');

    alert("running the empty snippet");

    ContactModel.emptyData();
    </jsitem>
            </javascript>
            <css/>
        </resources>
        <styles>
            <styleitem type="background" bgtype="none"/>
        </styles>
    </skuidpage>
  • Gregory SmithGregory Smith Skuad ✭✭
    edited January 2017
    I was a able to see the bug, and noticed that the 'working' version I came up with, somehow ended up with two click interactions.  When I remove one the bug returns.
  • Chandra VChandra V Member
    edited January 2017
    Oh good.  I was drafting a response saying I saw the interactions twice, and the context wasn't my issue, the duplicating on subsequent clicks was.  

  • Gregory SmithGregory Smith Skuad ✭✭
    edited January 2017
    I moved this up the ladder and it is a known bug.  They will be addressing this soon.  I'll keep you posted.
Sign In or Register to comment.