This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

AR workflow - if-else condition for "search activity returned no results"

Hi. I have a workflow that searches for a particular user. The if-else branch on one side is: If the username of found object is not empty. Works fine.

What if no object is found by the search activity? What's the recommended if-else branch for search activity returned no results?

  • To be more clear, there are two searches in the workflow. The first the activity finds a user.

    The second activity then searches for a matching user, based on a property of the found object for the first user.

    After the second search, I need to do an if-then branch. If the matching user is found, do this. That works fine. If there is no matching user found, do this. But what condition can I set, that will be true if the second search does not find any results?
  • I could be wrong about this but the way I always look at it is that any activity that's "in the box" with the Search will only fire if the Search yields something. So if the search result is null, the "in the box" action(s) will not fire.

    So all that to say, you don't need an If-Then branch for a null result.

  • How do you do a true "else" condition? In other words, if the first condition isn't true, then do the second branch.
  • You could try to set the conditions to look for "any attribute of Found Object is empty". Which should trigger if the search is null?