Problems with empty fields when using Extract table data

Hi, i have a webpage where i extract table data and send them to a Filter data table to specify what i want.

The image abow shows how it is when ‘Conflics_check’ has a value. If this one is empty in all tables, it does not show in the extracted data and this gives me problems when i want to use it to do something with an if statment.

Basically what i want is if conflics_check “Conflics” do something, else empty do something. This wont work when all tables are empty, because it does not show it.

How can i solve this is a good way?

Conflicts_check is surrounded by a try catch.

Hi @Ghagen ,

There might be a better method but for starters, we can check if the Column exists in the datatable and then proceed with the value retrieval in the If Condition


ahaa, i will try that… thanks for quick reply.

But the problem will still be when it’s not there at all?

There is not a away i can “Rewrite” blank to “no_conflicts” or something similar? i tried that with the NullReferenceException, but didn’t seem to work.

Hi @Ghagen ,

From the statement above we understood that the Column Conflicts_check doesn’t exist at some times in the datatable and exists sometimes in the datatable.

One way to handle it was using the expression provided previously, However, an alternate way would be to use Try Catch activity and use Add Data Column activity within it with the Column Name as Conflicts_check with Default value as empty string "". This should be done after the Data Extraction from Table.

Now whenever the column Conflicts_check is already present in the datatable, it will give out an error which is handled by the try catch, then you can continue with the normal steps.

If the column is not present in the Datatable extracted, then Add Data Column will add the column with empty value. Thus also avoiding error doing the value check for the column in further steps.

Check the above methods and let us know if you are able to implement it or if it suits well for your scenario.

Sorry, i’m a bit new to UiPath :confused: - So i didn’t understand that. Could you try again? Or maybe show me some pictures :smiley:

I guess this check should be under the extraction of data from data table?

Best would be if we could set a default here if it’s missing or blank(empty)? or something like that.