sliding panel context is lost

Hello Bill

I think your approach is right.

Is this issue for ALL other records or only the one you showed in the video? I could only imagine an empty field in model “Phone_List_Entity”?

Could you check if the Field has an entry on the model “Phone_List_Entry”?

If this doesn’t help i’d have to look closer into it.

Janick

I have added the “Connected_Phone__r.Id” which is the Id on the “Phone_List_Entity” so you can see it is not blank.

It seems to lose context. Just to recap this is how I have it set up

https://drive.google.com/file/d/0B409lhd9sYDcUDJBRTlEOU02bzA/view

Hey Bill

I just noticed that while querrying the models you’re getting more rows instead of replacing them. Is there a specific reason for that?
beside that, could you please provide the data structure and how the models are connected?

Janick

I was told that is how to perform a context query. Should it be changed?

Bill,

It is strange that everything on the 727-410-6584 sliding panel context works but the 333-333-3333 does not. My first instinct, like Janick’s, is to check whether there is any data that should be showing in the first place. What number is suppose to show up with 333-333-3333 and can you verify that information is where it is suppose to be?

4 days ago I posted a picture of the data in the linked file.

Hello Bill,

We appreciate your effort making videos and screenshots.

I cannot identify the issue this way however.
Could you provide OrgID, a user I can logon and the name of the page where the issue occurs?
I’d like to troubleshoot and hopefully be able to resolve the issue.

Thanks,

Janick

Did you get the credentials

Hello Bill,

Yes I’ve just logged on. I’ll check the issue today and might consult a colleague as well.
Will update you asap.

Janick

Hi Bill,

After taking a look at your org i came to the conclusion that your model “Phone_List_Entity” is not being
queried and also the condition you have in place would only work for the first row of the model “Phone_List_Entity_DNA”.

Please make sure the condition works for the row in context and the model is being queried after the condition has changed.

Please let me know if you need further assistance.

Thanks,

Janick

This is the tutorial given to me a year aga for drawers.  Can someone post a tutorial on how to get a related record in a panel to appear?  Or, is the a video tutorial already that I do not know about. 

Bill,

I think sliding panels need to be treated slightly differently than drawers. With drawers, you can have multiple drawers (linked to different records) open at once, but you can’t do that with sliding panels. Instead, only the info related to one record is shown at a time. I think the difference manifests in the query behavior of the model shown in the sliding panel. After you set the condition on the panel model, where you have “Get More - Merge in new Rows with old” you need “Standard - completely replace data” instead. Additionally, I think Skuid actually gives you two different ways to show related records in a sliding panel, and I’m wondering if doing both methods might be causing you some issues. The two ways:

  1. Set actions right before you open the panel to set a condition on the model showing in the panel, and then query that model to refresh it. Then, every time you click to open the panel the model gets limited to the record just selected

  2. Use the context conditions on the component in the sliding panel.

If I’m understanding your setup correctly, I believe you only need to do one of those ways. Here’s the XML for a page that shows contacts related to an account in a sliding panel:

Accounts

Related Contacts

Contacts

Hope that helps!

I am trying it out.

I copied your code. I added the following before slide panel. Still nothing. This is the kind of thing where I think Skuid should put together 1 minute videos to post to youtube. It would lead to greater customer satisfaction and faster user adoption.

What if I use a collapsible wrapper in the referenced object.  What and where would I put the set and query statements?  What would the conditions on which object look like?

Hi Bill -

I watched your video but given I’m unfamiliar with the objects in your system and can’t quite make out from the video which SObject links to which, I took what I think you are trying to do and converted the concept to use standard objects.

It’s always best when trying to tackle these types of issues to baseline with standard SObjects and reduce complexity with the scenario as much as possible. Not only does this strip away components/config that isn’t relevant to the issue but also allows those of us in the community to get a better understanding of the scenario in order to help :slight_smile: For example, the collapsible wrapper doesn’t have anything to do with what you are trying to accomplish so its a layer that can be removed from troubleshooting.

I think Stephen is on the right track with the “Standard” vs “Get More” but again, not really sure which model is which from watching the video.

In your case, I think you are using a “Model in field” condition instead of a specific value condition. This could be what’s throwing you off as well. Again, difficult to really understand without seeing the entire page.

In the example below I’m using Opportunities & Accounts to demonstrate what I think you are trying to accomplish.

Main Table - List of Opportunities which would be analogous to your “Phone Numbers” I think
Sliding Panel - Details of a single opportunity and details of the account referenced by the opportunity

In the page below, when the sliding panel row action is hit, the following occurs:

  1. Use the {{id}} from the Opportunities model to query the “Opportunity” model
  2. Use the {{AccountId}} from the Opportunities model to query the “Account” model
  3. Query “Opportunity” and “Account”
  4. Show the panel

There are some other ways that you could do this that would be better performing (e.g. re-use Opportunities model and avoid having Opportunity Model) but functionally the below works.

If I’ve misunderstood what you are trying to do or if you want to optimize some, let me know but let’s use Opportunities & Accounts so we’re speaking the same language :slight_smile:

Hope this helps!

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" useviewportmeta="true" showsidebar="true" showheader="true" tabtooverride="Opportunity">    <models>
        <model id="Opportunities" limit="100" query="true" createrowifnonefound="false" datasource="salesforce" sobject="Opportunity" type="">
            <fields>
                <field id="Name"/>
                <field id="CreatedDate"/>
                <field id="AccountId"/>
                <field id="Account&#46;Name"/>
                <field id="Id"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="Opportunity" limit="1" query="false" createrowifnonefound="false" datasource="salesforce" type="" doclone="" sobject="Opportunity">
            <fields>
                <field id="Name"/>
                <field id="AccountId"/>
                <field id="Account&#46;Name"/>
                <field id="StageName"/>
                <field id="Id"/>
            </fields>
            <conditions>
                <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Id" state="filterableoff" inactive="true" name="Id"/>
            </conditions>
            <actions/>
        </model>
        <model id="Account" limit="1" query="false" createrowifnonefound="false" datasource="salesforce" type="" sobject="Account" doclone="">
            <fields>
                <field id="Name"/>
                <field id="Id"/>
                <field id="CreatedById"/>
                <field id="CreatedBy&#46;Name"/>
                <field id="CreatedDate"/>
            </fields>
            <conditions>
                <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Id" state="filterableoff" inactive="true" name="Id"/>
            </conditions>
            <actions/>
        </model>
    </models>
    <components>
        <pagetitle model="Opportunities" uniqueid="sk-ZzVHy-87">
            <maintitle>
                <template>{{Model&#46;labelPlural}}</template>
            </maintitle>
            <subtitle>
                <template>Home</template>
            </subtitle>
            <actions>
                <action type="savecancel"/>
            </actions>
        </pagetitle>
        <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Opportunities" mode="read" allowcolumnreordering="true" uniqueid="sk-ZzVHy-88">
            <fields>
                <field id="Name" hideable="true" allowordering="true" uniqueid="fi-ZzUbT-245"/>
                <field id="CreatedDate" hideable="true" allowordering="true" uniqueid="fi-ZzUbT-246"/>
                <field id="Id" hideable="true" uniqueid="fi-a5g_G-594" valuehalign="" type=""/>
                <field id="AccountId" hideable="true" uniqueid="fi-a5dyc-581" valuehalign="" type=""/>
            </fields>
            <rowactions>
                <action type="multi" label="Run multiple actions" icon="sk-icon-magic">
                    <actions>
                        <action type="setCondition" model="Opportunity" condition="Id" value="{{Id}}"/>
                        <action type="setCondition" model="Account" condition="Id" value="{{AccountId}}"/>
                        <action type="requeryModels" behavior="standard">
                            <models>
                                <model>Opportunity</model>
                                <model>Account</model>
                            </models>
                            <onerroractions>
                                <action type="blockUI" message="There was an error" timeout="3000"/>
                            </onerroractions>
                        </action>
                        <action type="openSlidingPanel">
                            <panel title="Sliding Panel Contents" uniqueid="sk-a1HaF-358" size="350px" origin="right" closeonpageclick="true" behavior="overlay">
                                <components>
                                    <grid uniqueid="sk-a1T-J-362">
                                        <divisions>
                                            <division behavior="flex" minwidth="100px" ratio="1">
                                                <components>
                                                    <basicfieldeditor showheader="true" showsavecancel="false" showerrorsinline="true" model="Opportunity" buttonposition="" uniqueid="sk-a1Vi3-367" mode="read">
                                                        <columns>
                                                            <column width="100%">
                                                                <sections>
                                                                    <section title="Opportunity Details" collapsible="no">
                                                                        <fields>
                                                                            <field id="Id" valuehalign="" type="" uniqueid="fi-a5bSJ-566"/>
                                                                            <field id="Name" valuehalign="" type="" uniqueid="fi-a5bSJ-567"/>
                                                                            <field id="AccountId" valuehalign="" type="" uniqueid="fi-a5bSJ-568"/>
                                                                            <field id="Account&#46;Name" valuehalign="" type="" uniqueid="fi-a5bSK-569"/>
                                                                            <field id="StageName" valuehalign="" type="" uniqueid="fi-a5bSK-570"/>
                                                                        </fields>
                                                                    </section>
                                                                </sections>
                                                            </column>
                                                        </columns>
                                                    </basicfieldeditor>
                                                    <basicfieldeditor showheader="true" showsavecancel="false" showerrorsinline="true" model="Account" buttonposition="" uniqueid="sk-a1WNy-377" mode="read">
                                                        <columns>
                                                            <column width="100%">
                                                                <sections>
                                                                    <section title="Account Details" collapsible="no">
                                                                        <fields>
                                                                            <field id="Id" valuehalign="" type="" uniqueid="fi-a5bSK-571"/>
                                                                            <field id="Name" valuehalign="" type="" uniqueid="fi-a5bSK-572"/>
                                                                            <field id="CreatedBy&#46;Name" valuehalign="" type="" uniqueid="fi-a5bSK-573">
                                                                                <label>Created By</label>
                                                                            </field>
                                                                            <field id="CreatedDate" valuehalign="" type="" uniqueid="fi-a5bSK-574"/>
                                                                        </fields>
                                                                    </section>
                                                                </sections>
                                                            </column>
                                                        </columns>
                                                    </basicfieldeditor>
                                                </components>
                                            </division>
                                        </divisions>
                                        <styles>
                                            <styleitem type="background" bgtype="none"/>
                                        </styles>
                                    </grid>
                                </components>
                            </panel>
                        </action>
                    </actions>
                </action>
            </rowactions>
            <massactions usefirstitemasdefault="true"/>
            <views>
                <view type="standard"/>
            </views>
        </skootable>
    </components>
    <resources>
        <labels/>
        <css/>
        <javascript/>
    </resources>
    <styles>
        <styleitem type="background" bgtype="none"/>
    </styles>
</skuidpage>

One other note…

I modified the above to use “Get More” and set context on the field editors in the panel instead of “Standard” and not using context and it works which is what I would expect.

This leads me to believe that the core issue you are having is the way you have the model condition setup to use “Model in field” instead of “specific value”. That, or I’m unclear which model is used for the lower field editor in the panel so possibly its not even getting loaded when the panel opens?

Either way, the xml above which uses “Standard” or the one below which uses “Get more” should hopefully get you farther along with your real page. Let me know!

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" useviewportmeta="true" showsidebar="true" showheader="true" tabtooverride="Opportunity">    <models>
        <model id="Opportunities" limit="100" query="true" createrowifnonefound="false" datasource="salesforce" sobject="Opportunity" type="">
            <fields>
                <field id="Name"/>
                <field id="CreatedDate"/>
                <field id="AccountId"/>
                <field id="Account.Name"/>
                <field id="Id"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="Opportunity" limit="1" query="false" createrowifnonefound="false" datasource="salesforce" type="" doclone="" sobject="Opportunity">
            <fields>
                <field id="Name"/>
                <field id="AccountId"/>
                <field id="Account.Name"/>
                <field id="StageName"/>
                <field id="Id"/>
            </fields>
            <conditions>
                <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Id" state="filterableoff" inactive="true" name="Id"/>
            </conditions>
            <actions/>
        </model>
        <model id="Account" limit="1" query="false" createrowifnonefound="false" datasource="salesforce" type="" sobject="Account" doclone="">
            <fields>
                <field id="Name"/>
                <field id="Id"/>
                <field id="CreatedById"/>
                <field id="CreatedBy.Name"/>
                <field id="CreatedDate"/>
            </fields>
            <conditions>
                <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Id" state="filterableoff" inactive="true" name="Id"/>
            </conditions>
            <actions/>
        </model>
    </models>
    <components>
        <pagetitle model="Opportunities" uniqueid="sk-ZzVHy-87">
            <maintitle>
                <template>{{Model.labelPlural}}</template>
            </maintitle>
            <subtitle>
                <template>Home</template>
            </subtitle>
            <actions>
                <action type="savecancel"/>
            </actions>
        </pagetitle>
        <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Opportunities" mode="read" allowcolumnreordering="true" uniqueid="sk-ZzVHy-88">
            <fields>
                <field id="Name" hideable="true" allowordering="true" uniqueid="fi-ZzUbT-245"/>
                <field id="CreatedDate" hideable="true" allowordering="true" uniqueid="fi-ZzUbT-246"/>
                <field id="Id" hideable="true" uniqueid="fi-a5g_G-594" valuehalign="" type=""/>
                <field id="AccountId" hideable="true" uniqueid="fi-a5dyc-581" valuehalign="" type=""/>
            </fields>
            <rowactions>
                <action type="multi" label="Run multiple actions" icon="sk-icon-magic">
                    <actions>
                        <action type="setCondition" model="Opportunity" condition="Id" value="{{Id}}"/>
                        <action type="setCondition" model="Account" condition="Id" value="{{AccountId}}"/>
                        <action type="requeryModels" behavior="loadmore">
                            <models>
                                <model>Opportunity</model>
                                <model>Account</model>
                            </models>
                            <onerroractions>
                                <action type="blockUI" message="There was an error" timeout="3000"/>
                            </onerroractions>
                        </action>
                        <action type="openSlidingPanel">
                            <panel title="Sliding Panel Contents" uniqueid="sk-a1HaF-358" size="350px" origin="right" closeonpageclick="true" behavior="overlay">
                                <components>
                                    <grid uniqueid="sk-a1T-J-362">
                                        <divisions>
                                            <division behavior="flex" minwidth="100px" ratio="1">
                                                <components>
                                                    <basicfieldeditor showheader="true" showsavecancel="false" showerrorsinline="true" model="Opportunity" buttonposition="" uniqueid="sk-a1Vi3-367" mode="read">
                                                        <columns>
                                                            <column width="100%">
                                                                <sections>
                                                                    <section title="Opportunity Details" collapsible="no">
                                                                        <fields>
                                                                            <field id="Id" valuehalign="" type="" uniqueid="fi-a5bSJ-566"/>
                                                                            <field id="Name" valuehalign="" type="" uniqueid="fi-a5bSJ-567"/>
                                                                            <field id="AccountId" valuehalign="" type="" uniqueid="fi-a5bSJ-568"/>
                                                                            <field id="Account.Name" valuehalign="" type="" uniqueid="fi-a5bSK-569"/>
                                                                            <field id="StageName" valuehalign="" type="" uniqueid="fi-a5bSK-570"/>
                                                                        </fields>
                                                                    </section>
                                                                </sections>
                                                            </column>
                                                        </columns>
                                                        <conditions>
                                                            <condition type="contextrow" field="Id" mergefield="Id"/>
                                                        </conditions>
                                                    </basicfieldeditor>
                                                    <basicfieldeditor showheader="true" showsavecancel="false" showerrorsinline="true" model="Account" buttonposition="" uniqueid="sk-a1WNy-377" mode="read">
                                                        <columns>
                                                            <column width="100%">
                                                                <sections>
                                                                    <section title="Account Details" collapsible="no">
                                                                        <fields>
                                                                            <field id="Id" valuehalign="" type="" uniqueid="fi-a5bSK-571"/>
                                                                            <field id="Name" valuehalign="" type="" uniqueid="fi-a5bSK-572"/>
                                                                            <field id="CreatedBy.Name" valuehalign="" type="" uniqueid="fi-a5bSK-573">
                                                                                <label>Created By</label>
                                                                            </field>
                                                                            <field id="CreatedDate" valuehalign="" type="" uniqueid="fi-a5bSK-574"/>
                                                                        </fields>
                                                                    </section>
                                                                </sections>
                                                            </column>
                                                        </columns>
                                                        <conditions>
                                                            <condition type="contextrow" field="Id" mergefield="AccountId" operator="="/>
                                                        </conditions>
                                                    </basicfieldeditor>
                                                </components>
                                            </division>
                                        </divisions>
                                        <styles>
                                            <styleitem type="background" bgtype="none"/>
                                        </styles>
                                    </grid>
                                </components>
                            </panel>
                        </action>
                    </actions>
                </action>
            </rowactions>
            <massactions usefirstitemasdefault="true"/>
            <views>
                <view type="standard"/>
            </views>
        </skootable>
    </components>
    <resources>
        <labels/>
        <css/>
        <javascript/>
    </resources>
    <styles>
        <styleitem type="background" bgtype="none"/>
    </styles>
</skuidpage>

TaDa.  Barry is the best. Now this is cool.

Hey Bill -

I’m assuming by your comment that you got it working :slight_smile:  

In thinking more about the video and why I think you were having a problem, I’m almost certain it was due to the condition that you had on your model that was “field from model”.  In this case, regardless of the fact that you might specify a value for that condition in your action sequence, the value will be ignored and the “field from model” will be used.  Since model conditions don’t have context, it would always use the first row in model (which is why it worked for the first record in your video but not the others).  Having that condition be “specified value” and setting in your action sequence (which is the way my samples work) solves the issue.

I am now trying to create a link on multiple images on a page.  I set the behavior  as a “Link” .  My interaction is a “Click”, then I toggle a sliding panel.  In the sliding panel is a “Page Include”,  The first picture has a query string “Id={{{$Model.Why_Work_List.data.0.Entity_01__r.Id}}}”.  The second picture has a query string “Id={{{$Model.Why_Work_List.data.0.Entity_02__r.Id}}}”.  The picture picture has a query string “Id={{{$Model.Why_Work_List.data.0.Entity_03__r.Id}}}”.

When I click on any one of the three images, the correct sliding panel opens.  However, te same sliding panel data is opened regardless of the picture clicked.  I would think by passing Entity_01 or Entity_02 or Entity_03 it would open the related sliding panel.

https://drive.google.com/file/d/0B409lhd9sYDcYnJFOTJjOURvdjg/view