brenocamp Posted December 5, 2024 Posted December 5, 2024 Hello, I'm trying to create a dynamic condition based on the preexisting condition, Water Batch. How do I create another condition that: if Water Batch condition is greater than 14hrs, start the new condition after it and last 41hours. if Water Batch condition is lower than 14hrs, start the new condition immediate after Water Batch ends and last 41 hours. Struggling with Syntax and doing "if's" 🧐 cheers
Thorsten Vogt Posted December 5, 2024 Posted December 5, 2024 Hello, you may use the keep() function to filter for the duration and create the capsules: $condition.keep('Duration', isgreaterthan(10h)).afterend(3h) In the following example I am creating capsules of 1h length if the duration is less than 10 hours and capsules 3 hours of length if the duration is greater than 10 hours: Does this answer your question? Regards, Thorsten
brenocamp Posted December 5, 2024 Author Posted December 5, 2024 (edited) Hi Torsten, many thanks for your help! Just a slightly correction: if Water Batch condition is greater than 14hrs, start the new condition after 3 hours of the Water Batch Started and last 41 hours. (it might have some issues with the condition that has not been finished yet). if Water Batch condition is lower than 14hrs, start the new condition immediate after Water Batch ends and last 41 hours. (This one is ok)! Thanks for you help! Edited December 5, 2024 by brenocamp
Thorsten Vogt Posted December 5, 2024 Posted December 5, 2024 Hi, in that case I guess you can do $condition.keep('Duration', isgreaterthan(14h)).afterstart(41h).move(3h) Regards, Thorsten
brenocamp Posted December 5, 2024 Author Posted December 5, 2024 Hi Torsten, thanks for your message. Ive tried it but got that error even try with removelongerthan(72h).
Solution Thorsten Vogt Posted December 5, 2024 Solution Posted December 5, 2024 Hi, do you apply removeLongerThan() after $wb? Like $wb.removelongerthan(72h).keep(...)? Regards, Thorsten 1
brenocamp Posted December 5, 2024 Author Posted December 5, 2024 Many thanks Thorsten! $condition.removelongerthan(72).keep('Duration', isgreaterthan(14h)).afterstart(41h).move(3h)
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