What condition do I need to set so I can pull field history for a contact?

I am trying to have a table on a contact record that shows the field history for this contact. I have read many of the post and I understand that it will not look the same as the native table but I can’t get it to pull anything. I know it is the way I setup my conditions. I am building this on a contact detail page that I have tab set and one of the tabs I want to show the history of the contact.

The main condition is on the contact model that is Id=(param)Id

Condition I have tried on the History model:
ContactId = (Contact) Id
Contact.Id = (Contact) Id
ContactId = (param) ContactId
Contact.Id = (param) ContactId
ContactId = (param) Contact.Id
Contact.Id = (param) Contact.Id

I would love any suggestions. Thanks

I believe the issue is that you need to create a separate model on the contact_history object. Then you apply a condition on that model to restrict it to just the contact Id in context.

That was what I was trying to do. The contact model has the param condition on it and the Contact
_History model I have used the conditions above and none of them brings up data. 

Sorry, I missed that. The URL parameter is a page parameter and is the same for all models loaded on the page, so (param)Id should work for your history model too since that URL parameter is the Contact Id.

Following your syntax Sierra, it should be:

ContactId = (param) id

Or in terms of the Model Condition setup, here’s what it would be:

Salesforce SObject for your Model: ContactHistory

Condition Setup:
Value: Page / URL Parameter Value, Parameter Name: id

So I have setup the models with those conditions but it still is not pulling any information in. If I tell it to load on Model data on page load I just get the word “loading” on the page and nothing else happens. If it is not checked them the table comes up empty.

Your original post says that your contact model has a condition Id=(param)Id . Assuming that works on your contact model, that should mean that your URL parameter is “Id”, not “id”. Did you try ContactId= (param) Id with a capital i ?

Yes I am using the Capital I but I have tried it both ways and it doesnt work.

What if you try a different option? Instead of making the condition based on a URL parameter, what if you make it based on a field on another model. Then pick your contact model’s Id field.

Yeah I tried that too. I tried it with both of these options.
ContactId = (Contact) Id
Contact.Id = (Contact) Id

 Neither worked.

Did you add ContactId to your history model? It sounds like it isn’t in the model.

Yes I did.

I looked through some pages I’ve built. I displayed the history of a custom object and I used: ParentId= (param) id

I dont see a ParentId for contact history

Did you activate field tracking for contacts in Salesforce settings?

yes. This feature works fine on the native pages just cant get it working on the Skuid side

If you remove all conditions on your history model, do any records populate?

No I dont get any record to populate

Seems like a problem with the model settings, not the condition. I think you should get some records in the absence of any conditions. If you are unable to get any records under any circumstances, it seems like a model level problem, not a condition level problem.

So I removed the contact model and just have the ContactHistory model and if I preview it with the “Load Model Data on page load” checked then I get a  error.

JSON string exceeds heap size limit 

An unexpected error has occurred. Your solution provider has been notified. (System)

With that unchecked then I get the table but with no information populated