Missing of XML Elements

Hi there,

Could anyone assist me what to fill in over the red frame in if activities if some of my xml script couldn’t find the pfv element?
Capture2

Thanks and best regards.

Hi,

How about pfv = Nothing
You can check it using IsNothing if there is no element.

Regards,

Hi,

But why my execution always popped out with this error?

As below are my xml script as you can see some having pfv but the element covered with read frame do not have pfv node. So what can I do to continue my execution?

Hi,

Can you modify Condition property as the following?
item.Descendants("pfv").Count=0

Regards,

Hi,


There’s another problem occurred here :’(

Hi,

It’s because pfv is null (Nothing).
So perhaps you should use if activity and process this assign only when pfv isnot Nothing.
When pfv is Nothing, you need to assign some value to dictionary item, if necessary.

Regards,

Hi,

So how am I going to modify the workflow? Isn’t it I need to set default value on it or what? Sorry that I’m new to this UiPath.
Attaching the xaml file.
test.xaml (10.3 KB)

Thanks and regards.

Hi,

How about the following? If pfv is nothing, the item of dic will be empty.
#Move the assign activity to Else section of If.

img20191118-2

Regards,

1 Like

Hi @Yoichi
I got to run out my workflow. Thanks so much :’)

1 Like

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