Object reference not set to an instance error source Boolean uipath error

@ALL

hi guys

I have added the queue item to the queue (Suppose 1 queue item) It is perfectly running when I am executing the file when new transaction item is there but when it goes to the null value it is giving me the error like shown below::

image

I am using the command on flow decision activity like
IF
transactionItem.Id.ToString <> “”

But showing me the above error. Please help me.

Basic workflow design is given below::

image

yah obviously it would because it has null value buddy

Cheers @AryanSingh

@Palaniyappan

So how can i resolve it so that, it wont give me the exception!

@Palaniyappan

I mean what condition can i write so that it so doesn’t give me the exception!

Not String.IsNullOrEmpty(transaction.Id.ToString) can be used but
may i know what is that .Id in this expression
Cheers @AryanSingh

@Palaniyappan

Id is for the specific transaction item. So it will be dynamic for every transaction Item.

Like for the first transaction, it was some 6 digit figure.

@Palaniyappan

I tried this but same issue coming.

@Palaniyappan

Actually what i really want to do is that, if the next queue item is empty/no next queue item is there. Then i want the workflow to write as “Completed” as you can see after the flow decision activity.

I know i can use try catch activity. But, i wanna find a solution.

Please guide me in it, Only this error is remaining.

1 Like

Fine before is FLOW DECISION use another flow decision and mention like this
trItem = Nothing
if true we can connect that to a message box stating “no transaction item”
or it will goto false part where we can have this current flow decision and there we can validate the trItem.Id.String <> “”

Cheers @AryanSingh

@Palaniyappan

Ok. Let me try.

@Palaniyappan

I tried. But same issue.

I used transactionitem.ToString = Nothing

As it was showing the below error.

1 Like

ohh sorry it should be like this
trItem is nothing

Cheers @AryanSingh

1 Like

@Palaniyappan

Thanks Buddy Its solved.

Cheers @AryanSingh

1 Like

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