TeJa TJ Posted March 18, 2023 Report Share Posted March 18, 2023 Hi Ftrack Community and Team, In my recent client project, I got a request to retrieve first and last stamp of boolean type custom attributes when they are checked. Therefore, I have gone through the api reference but the custom attribute entity has no attribute that helps my query. Can you please suggest me a way or approach to tackle this problem? Product>custom_attributes : ContextCustomAttributeValue {} > ContextCustomAttributeValue entity_id : string * Primary key immutable configuration_id : string * Primary key immutable configuration : CustomAttributeConfiguration key : string value : variable Best regards, TJ Link to comment Share on other sites More sharing options...
Lorenzo Angeli Posted March 21, 2023 Report Share Posted March 21, 2023 Hi @TeJa TJ to see when a custom attribute has been last changed you can query the Event entities as such: custom_attribute_events = session.query(select insert, parent_id from Event where insert is "update.custom_attribute" and parent_id is "<your-task-id>").all() this will return an Event object which will hold the timestamp on the created_at field and the previous and current value under the data field hope it helps. L. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now