James Gallally Posted April 28, 2021 Share Posted April 28, 2021 Good afternoon, I am trying to get a BPM decision to work based on what time an incident was logged. The purpose is so that when it happens out of hours a set of actions gets triggered that don't normally happen in hours. I thought it looked simple enough until I found out that the Hornbill Automations -> Get Request Info -> Time logged is not written in the database. Its been a little while, and I am struggling to get insert this variable into a custom filed (which I believe I will then have to manipulate into a string ... ) so I can then do <> for the different actions. Has anyone done this or have an example they can share? Any help would be much apricated. Thanks James Link to comment Share on other sites More sharing options...
Steve Giller Posted April 28, 2021 Share Posted April 28, 2021 @James Gallally The "Time Logged" value is measured in seconds past midnight (UTC) so on my test of a Request raised at 4:19pm BST I have a value of 55149.000000, which is 15 hours, 19 minutes and 9 seconds past UTC (+1 hour for BST = 16:19:09) i.e. (15*3600)+(19*60)+9 So to use this for working hours you'll firstly have to factor in whether the Request is raised during BST, then convert times past midnight into seconds, then proceed with the calculation. The date/time functions in iBridge (which I'm not an expert on!) may help here. Link to comment Share on other sites More sharing options...
Steven Boardman Posted April 28, 2021 Share Posted April 28, 2021 @James Gallally following on from Steve's comment, i've shared a process which checks site, day and hour to determine what to do - it shows the utility Steve referred too, and it may help as an example - using the bits which are relevant to you hours-example.draft.bpm.txt Hope that helps Steve Link to comment Share on other sites More sharing options...
James Gallally Posted April 29, 2021 Author Share Posted April 29, 2021 Thanks for the explanation @Steve Giller, I had seen a similar value whilst testing different options and couldn't understand how it was arrived at. Thanks @Steven Boardman that looks almost exactly what I am trying to achieve, I'll have a look at seeing if I can replicate it. Thanks both for your help. James Link to comment Share on other sites More sharing options...
James Gallally Posted April 30, 2021 Author Share Posted April 30, 2021 Thanks @Steven Boardman, I have tweaked your example and it works exactly like I was hoping. Just need to figure out the daylight saving part. Thanks 1 Link to comment Share on other sites More sharing options...
Victor Posted May 5, 2021 Share Posted May 5, 2021 @James Gallally What specifically about BST? 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