Does an activity exist that is like a TryCatch but is able to try an activity and return if its a completable action or not?
For example I’m using the Select Item activity to select an item in a dropdown list on an on prem SharePoint site. If the activity can find the item then it selects it and there is no issue. But if it can’t find the Item then it times out and the process fails.
Is there a way that I can handle this by effectively trying the select item activity and return something like a Boolean result if the item its looking for in the list is found? Using a TryCatch, I believe and happy to be told otherwise, can only catch an exception which is too great of an error in this case in my opinion.
For Select Item activity, find children activity as mentioned by @ppr will work very well
Just to complement
Another approach using Try Catch in case you don’t want to build extra validation or it is very complex is catch the more specific exception as possible and choose what you want to do in that case.
Thanks you @rikulsilva and @ppr for your super helpful responses.
I have tried all your suggestions and found the following solution. The Find Children activity was the activity that worked in the end, it was able to retrieve the options from the dropdown boxes and store them in a UiElement array variable of type ITNumerable. In this case it was able to find 9 elements.
Then I put in a for each loop set to the correct Object type to match the variable and had to use the option GET set to aaname and cast that to a string. I was then able to do the comparison to the input string in an If statement.
Appreciate your help and advise, got there in the end!! Thanks