Page 1 of 1

Pulling date limited data from JobOrderEditHistoryFieldChange table

Posted: Fri Jan 25, 2019 11:37 am
by ivandevpartner
Hello,
Can anyone help me with the concept of pulling data from JobOrderEditHistoryFieldChange table that has been changed or added within a specific time frame?

Ideally I'd like it to be something like this:

Code: Select all

/query/JobOrderEditHistoryFieldChange?where=(dateAdded>=946677600000)AND(dateAdded<=1577829600000)&fields=oldValue,newValue,columnName,display,id,editHistory(id)&sort=id&count=500&start=0
I am aware that the table has no date field so that is why I need some other way to handle additions or changes in that field.

Re: Pulling date limited data from JobOrderEditHistoryFieldChange table

Posted: Tue Jan 29, 2019 2:52 pm
by KevinSupport
Hi Ivan,

You need to get the dateAdded from the Edit History which you can do with a small alteration to your call:

Code: Select all

/query/JobOrderEditHistoryFieldChange?where=(editHistory.dateAdded>=946677600000)AND(editHistory.dateAdded<=1577829600000)&fields=oldValue,newValue,columnName,display,id,editHistory(id)&sort=id&count=500&start=0&BhRestToken=eb913efc-bc2c-4e71-93e3-9d7b01e3d624
To be specific, you need to change dateAdded to editHistory.dateAdded so that it pulls the associated dateAdded from the {Entity}EditHistory table.

Re: Pulling date limited data from JobOrderEditHistoryFieldChange table

Posted: Wed Jan 30, 2019 9:51 am
by ivandevpartner
Looks like that worked.
Thanks.