"IF" workflow step is not working

Jeremy F_
Giga Expert

Hello Community,

We have a workflow that looks to see if the "Opened by" person has the word "president" in their title. If they do have "president" in their title, then it goes to Finance for approval. If they don't have have "president" in their title, then it goes to their manager for approval first, then goes to Finance for approval. I cannot figure out why the "IF" step isn't working as expected. It goes to the person's manager even if they have "president" in their title. Instance version is Rome.

find_real_file.png

find_real_file.png

Manager approval step it keeps going to even if they have "president" in their title.

find_real_file.png

find_real_file.png

1 ACCEPTED SOLUTION

Jeremy F_
Giga Expert

I found the issue. Apparently conditions within workflows are case sensitive. I had the condition as opened_by.titleLIKEpresident^EQ, "president" with a lowercase "p". The actual title is "President" with an uppercase "P". I updated the workflow IF step condition to opened_by.titleLIKEPresident^EQ with an uppercase "P" and now it works as expected. I didn't realize that would make a difference because case doesn't matter when I'm querying from a table.

View solution in original post

6 REPLIES 6

Allen Andreas
Administrator
Administrator

Hi,

Is this version of the workflow actually published and not still checked out?

If there was any edit and you were working on this and haven't published it, new records won't follow this workflow. You'd want to review the workflow context for an example record and see what happened with the flow.

Also, recall that the opened by could be different than the requested for, so are you verifying the actual opened by person and their title?

Also, as a side note, the GlideRecord instantiation (var group...) in your approval script can be removed as it's not really doing anything? So it's not appropriate to be there.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Thank you for the response, Allen. The workflow is published. I checked the workflow context and the IF step is returning NO even though the test user has the term "president" in the title. The approval is going to the Manager. I don't understand why this is happening since I impersonated the test user to submit as that user.

find_real_file.png

find_real_file.png

find_real_file.png

Hi,

Understood.

My apologies for not saying it clearer, but yeah, that's what I was meaning when I mentioned above to actually check the title to ensure it was correct (meaning including case, haha). I can see why you'd think it would work fine given the behavior elsewhere in the platform, though.

Either way, glad you got it 🙂

Please mark reply as Helpful/Correct, if applicable. Thanks!

 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Aman Kumar S
Kilo Patron

Can you show your ritm form?

Best Regards
Aman Kumar