Using Else If statements

Hey Devs can you help me in the problem i have defined below

Problem Statement:
I want to extract the title of a person e.g (MR ,MRS,MISS, DR etc ) which the person fills on a Membership application form i have attcahed below.And then using this title which a person provided on the form to select their title on a drop down menu on the desktop application of which the screen of the desktop application i have highlighted below.

What i have tried before:
I have tried using the “Get full text” activity to get the title of the person on the application form and assigned a string variable to this “Get full text” activity in my case (i.e member_title).Then using this variable i have used an else if statement on which on the condition i have placed (member_title ) to be equal to MR on the first condition and then the Bot should selct the title MR on the desktop application and then . on the second condition i have placed()member_title to be equal to MRS on the second condition and then the Bot should select the title MRS on the desktop application.

My problem is that the Bot is only executing the Else part of the flow

Hi @Xolani_Mhlanga

Can you try implementing this same thing using ‘Switch’ activity. This will not only provides you multiple option handling capability, but also reduces the dependency on else-if ladder dependency.

Hope this helps,
Best Regards.

Thanks @arjunshenoy but it only executing the default value only.
Any solution



Well, in that case, please check that data that you are getting in the variable member_title. Also, instead of directly checking whether they are equal, use Contains() function & check whether it helps or not.

Best Regards.

Well i have used the Conatins() function and still its only execting the default value