Message Box not showing the correct value for the variable during run time

When I am running the sequence in Debug mode the Message box showing the correct value for a variable. but When I run it normal mode it is showing wrong value which is not at all in scope. any help, please?

Hi,
Can you please provide screenshot or sample workflow file for better understanding.
Please check the message box value is string or not… before run. what is the value you are showing in the message box?

I am using Uri(url).Segments.Last().ToString to get an account number from the url below.
http://xxxx/yyyy/Account/12345. Here I am getting the 12345 as the result and it correctly displayed in the message box when I execute in Debug mode.
But when I run normally I am getting β€œCreate” as the result in message box.

image
in normal mode

image
in step by step execution. This is the correct value.

I am not clear abouttestMessageBox_debugMode.zip (16.4 KB) the data type of value which is return from β€œUri(url).Segments.Last()”.
Please find the attached file and get me back if it is working or not.

This method will return the last segment of the url. in my case it is account number and it returns it as string

Hi @jeyaprakasamm

For extracting acc No what steps you are using ??

You are extracting it by using String Manipulation or Regex ??

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

Hi @jeyaprakasamm

Below are the steps and workflow which will give the expected accNo as output always even you Debug or Run the workflow

Note :- If the account no is going to be last always then only

Workflow :-
MainPratik.xaml (8.9 KB)

String str = β€œhttp://xxxx/yyyy/Account/12345”
Integer diff = str.Length-str.Replace(β€œ/”,β€œβ€).Length
String AccountNo = str.Split("/"c)(diff)

Output :-
image

Mark as solution and like it :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like

That works. Thanks.

Hi @jeyaprakasamm

You are welcome :sunny:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

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