Is there a secret to working with History Drawers?

I have 2 tables, each with a drawer that shows the record’s history.  The configuration is identical for each table.  The history table in the drawer has a context condition of ParentID = Id.  In one table it works fine (sometimes) and in the other it doesn’t work.  The setup is identical on these 2 tables.  What is happening?  Also, why is the ParentID of the history set to the Id of the primary table?  When I add the fields for reference, it looks like the Name field is the matching field to the ParentID.  Very confused…

Same model?

A couple of ideas here. 

1. Make sure you have installed at least 5.15 from the skuid releases page.  We made some improvements to drawers that help solve the “child data” in drawers issue there. 

2. You need to use “on open actions” with this kind of drawer rather than context conditions.  In the drawer properties look for “on open conditions” and add an action that activates a conditon on the history object to pull in the history items for the account ID in question.  

Then add a second action that queries your history obect - but look for one more property that says somthing like “add data to the end of the model”.  What this does is pull together the right history records that are specific to the account.

This is very short and cryptic.  Let me know if you need more detail and I’ll flesh it out.  This is just the best I could do in the midst of Dreamforce…  

I’ve got version 5.8 as a trial. Where can I get version 5.15?

Look at skuidify.com/skuidreleases

i can’t seem to find the “on open actions”.  i installed 5.21 and i see some new features (before load actions), but nothing that says “on open”.  where exactly is it?

okay - i found the “Before Load Actions” and here is what I did:

1. Added a condition to the history model that filters the ParentID to the Id of the primary model.



2. Added an Activate Model Condition to the history drawer table’s Before Load Actions.  I should note that all of these tables are in a Tab Set which is accessed though a popup.



3. Added a Query Model to the history drawer table’s Before Load Actions.  The Query Behavior option is set to “Get More - Merge in new Rows with Old”.  This is querying the history model.



4. I have confirmed that the Context conditions have been removed from the table, as have all Rendering conditions.

It is still not working.  The history drawer will open, but it will always display the history of the first record in the model, not the selected record.  Please help…


anything?

Yep.  Something.  

Step 2 should use “Activate and set value of model condition”   With simply activating you are not acutlaly sending the conditon a value to use in its filtering.  You need to send the ID of the Parent Model which will be in context in the table. 

Let us know if this works.  

It still isn’t working.



I’ve tried using {{Id}}, {{Name}} and leaving the value blank.  No matter what I do, the history drawer always shows the history for all of the records in the model, not just the selected record.

Here is the history model with the condition:



Any more thoughts?  This is kind of an important feature of our site…

Hey Rob - It looks like the only way I can get it wot work is by have both a CONDITION in the history model AND a CONTEXT RENDER in the table of the history drawer.  I read in another post that this is not the correct way to do it, so I want to make sure that I’m not causing myself other issues later on.

Scrap that - it doesn’t work now… back to the drawing board…

I’ve noticed that before load actions run only once per Drawer open action.

Scott.  I created a tutorial on getting this done.  Then based on Pat’s response, I realized I had left out some critical information and so I updated the tutorial this morning.  It includes a link to a sample page you can install to see it in action.  Check it out here:  http://help.skuidify.com/m/components/l/269735-add-nested-rows-to-your-table-with-drawers

If you can’t get this working let us know and we can set up a call next week. 

Thanks Rob - I was able to get it working… nice!

Glad to hear.  That is one of the more complicated setup items in Skuid.  But its very cool!