System.ArgumentException: Column 'Color' does not belong to table Simple Fields. at System.Data.DataRow.GetDataColumn(String columnName)

Hi,
I am trying to read PDF table following: https://www.y
readPDFTable.zip (504.8 KB)
450067597600200.pdf (273.2 KB)
outube.com/watch?v=WPKEJLW7_Js
I have a column “Color” I am getting error when Trying to read from Data Table.

15:49:06.4386 => [ERROR] [UiPath.Studio.App.Logging.OutputLogger] [96] Assign: Column ‘Color’ does not belong to table Simple Fields.
15:49:06.4779 => [ERROR] [UiPath.Studio.App.Logging.OutputLogger] [69] System.ArgumentException: Column ‘Color’ does not belong to table Simple Fields. at System.Data.DataRow.GetDataColumn(String columnName)
at System.Data.DataRow.get_Item(String columnName)
at Namespace_0763.Main_Expressions.Main_Expressions_TypedDataContext5_ForReadOnly.__Expr17Get()
at Namespace_0763.Main_Expressions.Main_Expressions_TypedDataContext5_ForReadOnly.ValueType___Expr17Get()
at Namespace_0763.Main_Expressions.InvokeExpression(Int32 expressionId, IList1 locations, ActivityContext activityContext) at System.Activities.Expressions.CompiledExpressionInvoker.InvokeExpression(ActivityContext activityContext) at Microsoft.VisualBasic.Activities.VisualBasicValue1.Execute(CodeActivityContext context)
at System.Activities.CodeActivity1.InternalExecuteInResolutionContext(CodeActivityContext context) at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity1 expressionActivity)
at System.Activities.InArgument1.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance activityInstance, ActivityExecutor executor) at System.Activities.RuntimeArgument.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance targetActivityInstance, ActivityExecutor executor, Object argumentValueOverride, Location resultLocation, Boolean skipFastPath) at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument, Int32 nextArgumentIndex, ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate)
at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary`2 argumentValueOverrides, Location resultLocation, Int32 startIndex)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Regards,
Zahid Rahim

Hi @Zahid_Rahim ,

Could you perform a Debug and check at the Error point what are the column values of the Datatable using the Immediate Panel ?

I am able to fix the error but instead of getting the table output with columns and rows I am getting this output:

Style SWD
112339968 table

So SWD was my table name and that table has many columns and rows. but instead of getting table details i am getting just table written.

Regards,

Zahid Rahim

Hi,

Probably, you should use Table(3) as the following. Can you try this?

row.item("Color") = dataSet.Tables(3).rows(0).item("Color").ToString

Regards,

With this change I am only able to see Color rather than seeing the complete table. Now the final output displayed like this:

image

In C column under second row it should show my complete table (All Columns and Rows) rather than just simple text as “table”

Hi,
Can you share expected output?
We can get the following table using dataset.Table(3) with Write Range activity.

image

Regards,

Hi @Yoichi,

This is the output I was expecting.

As you have seen in the pdf, My table is on 2 pages. But I could select only one table on one page. Is there any way I can select complete table from 2 pages?

Regards,
Zahid Rahim

Hi,

As far as I know, it may be necessary to get each tables and merge them into one table because DU is processed on a Page-by-Page basis.

Regards,

1 Like

HI @Yoichi ,

Thank you for all your help. With your help I am able to almost complete my first project with UiPath. Only Last issue left. I have added few more fields in Taxonomy and in Template Manager But unable to get those values.

The newly added fields are: Buyer, BuyerAddress, PONO, MasterPO, Season.

Regards,
Zahid Rahim
readPDFTable.zip (999.2 KB)

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