Ben Hines Posted December 4, 2024 Posted December 4, 2024 I have an addon that creates a condition using spy.push to push a metadata dataframe and a data dataframe. The metadata df has one row and columns "Name", "Type", and "Maximum Duration". The data df also has one row with columns "Capsule Start" and "Capsule End". After spy.push'ing this to my worksheet, it looks perfect except... I anticipated that the user would be able to add capsules to the condition just like they would if they created a manual condition through the UI. Unfortunately, the resulting condition doesn't seem to be editable. Is there a way to create a manual condition with one capsule (because empty conditions aren't allowed by Seeq) using spy.push?
Solution Thorsten Vogt Posted December 4, 2024 Solution Posted December 4, 2024 Hi Ben, pushing it only as metadata with a formula and the UIConfig property set worked for me: spy.push( metadata=pd.DataFrame( [{ 'Name': 'Manual Condition From Data Lab', 'Type': 'Condition', 'Maximum Duration': '2d', 'Formula': 'condition(1h, capsule("2024-12-03T00:00:00Z", "2024-12-03T01:00:00Z"))', 'UIConfig':'{"type":"manual-condition"}' }] ) ) Regards, Thorsten
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