Condition for a search bar

Hi UiPath fam I am a newbie in UiPath and would like some assistance please:

image
image
image

I have that search bar there, so I want a condition that will say, search with that ‘OutlookPolicy’(this is from the outlook email), if it’s not there use the ‘policynumber’(this from API), if you can’t find anything when searching using those 2 policies then search with an ID number.
I already have everything set and working fine but it just the logic around this part I need assistance from.
I would greatly appreciate your swift responses thank you :slightly_smiling_face: :slightly_smiling_face:

@Anelisa_Bolosha

What you can do is…

Use a type into activity with outlookpolicy first…then use a check app state activity to check if search is successful…

On the else aide of check app state use another typeiinto for api policy number and use another check app state to check the results

And again on the else side of check app state use one more type into for the id number

Hope this helps

Cheers

Hii @Anelisa_Bolosha ,
Did you try with the Else if activity? You can try this using else if condition

  1. Condition from OutlookPolicy
    Elseif
  2. Condition to use Policy Number
    Else
  3. You can type into ID Number

Cheers,

1 Like

Thank you for the response, i’m looking into it will revert back

1 Like

Hello @Jithesh_R , will check it thank you

1 Like

Hi Everyone, so the condition is : search with OutlookPolicy if it doesn’t exist then use policynumber (already have this condition) and IDnumber. So I should search with policy(returns results) and also with ID(returns results). So it should search with this and also search with that. If when searching with both, the results come back saying ‘no policy existing’ then I do something else.

@Anelisa_Bolosha

Then use 3 check app state anf if combinations one after the other

Search
Checkappstate
If
Search checkappstate
If
Search
Checkappstate
If

Cheers

1 Like

image
:),in case I am not explaining it well

@Anelisa_Bolosha

If you need to search one and if found then need to stop then use the above quotes

If you need to search all irrespective of one is found or not then use the below

As per screenshot if feel you need to use the first approach

Hope this helps

cheers

Hi @Anil_G Thank you for your response in my process I do have an ‘element exist’ activity in place, if so do I then need the ‘Checkappstate’?

@Anelisa_Bolosha

Yes element exists or check app state functionalities are same…one is clssic and other is a modern activity…

Please use either of them and if you want to see elwmnet exists then go to activities panel → click on filter icon → select show classic then you can see

Cheers

1 Like





Hi @Jithesh_R
This is how I did it hope it’s correct

Hii @Anelisa_Bolosha ,
You can go with only else if condition itself ,no need to put if condition at first. all the condition will work with one activity that is Ele if itself . whatever you provided in the if activity you can put in else if activity for better and easy appraoch however this is also not a wrong one if its works fine then you can continue with this itself .

Thanks,

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.