Guest Paul Alexander Posted June 11, 2019 Posted June 11, 2019 I'm setting up a BPM where an email is sent asking the requester if they want their request updated (it's for sabbatical leave, the return date of which is set, but the employee doesn't always come back - so we're asking the Line Manager whether this person has returned to work or not) What we'd like to do is send the email, then suspend the call waiting for an update. If there hasn't been a response within a week (measured by setting the 'expiry' on the suspend node) resend the email. What we need though, is to be able to set this to only go round this loop a set amount of times. So, what I'm looking for is a counter (possibly something set up in the integrations node to count how many times this particular node has been 'fired'?) and, once this counter reaches a particular number, to exit the loop. Is this something that's already possible in a BPM? Or, if not, is it something that could be added please? thanks
Victor Posted June 11, 2019 Posted June 11, 2019 @Paul Alexander you could this by storing the loop counter in a custom field... obviously having an "internal loop counter" would be best but using the custom field would be an interim workaround until the request for the counter is considered and implemented (if...)
chrisnutt Posted November 7, 2019 Posted November 7, 2019 Hi @Victor I'm trying to achieve something similar. In a change I want a loop when the change manager sends the request back to the owner for more info. I've arrived at the conclusion above too, but I don't know how to execute it. I want to use h_custom_30 to store a counter. Is it as simple as adding '+1'? Or do I need more syntax? Presumably something like h_custom_30 = h_custom_30 + 1? Any help would be gratefully received? Thanks
Guest Paul Alexander Posted November 7, 2019 Posted November 7, 2019 Hi @chrisnutt I couldn't get the '+1' bit to work on mine (I'm sure it's easy, but I just couldn't get it to work) so I ended up just doing adding '&[global["flowcode"]["customField40"]]1' That then gives you: 1 11 111 I check with a decision tree at each time round and, if the field value is 111 then I exit the loop (I only want it to go round 3 times). I don't know if that helps?
chrisnutt Posted November 7, 2019 Posted November 7, 2019 @Paul Alexander Yes that helps. Certainly an option. Would be interesting to find out if there is a way to achieve what we need though. @Victor, any clues? Chris
Victor Posted November 7, 2019 Posted November 7, 2019 @chrisnutt @Paul Alexander &[parseInt(global["flowcode"]["customField30"])+1] I am worried that even on holiday I know these things.. ... One of these days I will really take a holiday... 1
chrisnutt Posted November 8, 2019 Posted November 8, 2019 12 hours ago, Victor said: One of these days I will really take a holiday... Thanks @Victor But... Stop working! Get some rest and enjoy your holiday
chrisnutt Posted November 8, 2019 Posted November 8, 2019 Hi @Victor One for when you're back. I'm getting a warning with that. I've not yet tested it. Attached is the warning message. Chris
Victor Posted November 8, 2019 Posted November 8, 2019 @chrisnutt where exactly are you using the variable?
Guest Paul Alexander Posted November 8, 2019 Posted November 8, 2019 @chrisnutt That error is fine.......I get it with all of my javascript additions but it doesn't stop things working.
chrisnutt Posted November 8, 2019 Posted November 8, 2019 Just now, Victor said: @chrisnutt where exactly are you using the variable? In a hornbill automation node, against the h_custom_30 field 1 minute ago, Paul Alexander said: That error is fine.......I get it with all of my javascript additions but it doesn't stop things working. Good to hear. Will give it a whirl when I've finished all the other bits and bobs. Chris
Victor Posted November 8, 2019 Posted November 8, 2019 1 hour ago, chrisnutt said: In a hornbill automation node, against the h_custom_30 field Pics or it didn't happen! On a serious note, any screenshot of how you use it? Because when used as update content for a custom field, the BP should not report that message...
Victor Posted November 8, 2019 Posted November 8, 2019 @chrisnutt right... mkay, maybe something changed in the validation mechanism since last time I tried... anyway, as @Paul Alexander said, as long as it's a warning, it should work. The warning is about not being able to match it with an existing variable which we're not interested into... anyway, short story, give it a try, it should work
Steve Giller Posted November 8, 2019 Posted November 8, 2019 2 hours ago, chrisnutt said: Hi @Victor One for when you're back. I'm getting a warning with that. I've not yet tested it. Attached is the warning message. Chris @chrisnutt I managed to get that warning by using the wrong variable: My Get Request Details node had a Result Reference of task, so the variable was &[global["flowcoderefs"]["task"]["customField30"]] and the code in the update node became &[parseInt(global["flowcoderefs"]["task"]["customField30"])+1]
Berto2002 Posted December 12, 2023 Posted December 12, 2023 @chrisnutt does this still work? Does &[parseInt(global["flowcoderefs"]["task"]["customField30"])+1] numerically increment the integer value from 1 to 2 to 3 to 4 etc?
Steve Giller Posted December 12, 2023 Posted December 12, 2023 I would strongly caution against relying on it.
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