sweety
(sweety)
April 17, 2020, 8:17am
1
I have stored my Excel file in orchestrator. from there i am reading values from excel. now i want to read the null values and throw exception.
I am using this
NOT string.IsNullOrEmpty(in_TransactionItem.SpecificContent(“Name”).ToString)
but its not throwing exception for null values.
That line alone will not throw an exception. If you want to throw an exception, you can put that condition in an If activity, and in the Else section, add a Throw activity.
1 Like
sweety
(sweety)
April 17, 2020, 11:56am
3
i have used if condition. below is the screenshot for your reference.
If there are any spaces in the “FirstName” field, that will not be null or empty. Step into the code and see if there is something like that in the content.
Can you show me where the process goes when you use Step Into for that value? Curious to see what path it takes when the value is blank or null.
Also, if you can provide a screenshot of what that specific content is set to from the Locals panel, that will help.
sweety
(sweety)
April 17, 2020, 12:09pm
7
It will read that empty value and it will fill in application.
.
When First Name is empty it should throw exception but its not throwing
I mean in Studio, not the application itself.
Hi @sweety ,
Can you try using Trim and see if it will still proceed? It should look like this:
NOT string.IsNullOrEmpty(Trim(in_TransactionItem.SpecificContent(“FirstName”)……)
sweety
(sweety)
April 17, 2020, 12:39pm
11
Thanks alot. its working:-)
1 Like
system
(system)
Closed
April 20, 2020, 12:39pm
12
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.