Hi Team, i am testing negative scenario for exception case where i am creating exception manually and data is updating on the add data row where i am facing errors, help me to solve this issue.
you can see the img for refeence and immediate paner window.
@Rakesh_Tiwari , Check the number of columns in the Data Table you are adding,there must be mismatch in the number of Array Fields you are adding.
You have provided more items in the ArrayRow than there are columns in the DataTable. Ensure that the number of items in the ArrayRow matches the number of columns in the DataTable.
Hope it helps!!
Hey @Rakesh_Tiwari have you created the same number of columns in that datatable where you are passing all the values.because this type of exception is come when the data size is more than the number of columns you have add/create in the datatable.
cheers
yes, it has same number of column in datatable and it was working till today, i did not do any changes.
@Rakesh_Tiwari if this working fine till today can you check if the data you are adding in that datatable have the same value or did not hold any column.
- Check the file or data being processed for unexpected changes.
- Add logging or debugging steps to validate the structure of the data you’re passing into the DataTable.
cheers
Hi @Rakesh_Tiwari
There might be small addings by mistake. Debug and check it in immediate panel
Whether the array you are passing in the activity {“value1”,“value2”}.Count = YourDataTable.Columns.Count
Check it!
that is resolved in next run
Your query is resolved or still facing issue… @Rakesh_Tiwari
If you are still facing issue, describe the issue then we are able to give solution for that.
no, it is resolved automatically, can you pls me in writing this?
String.Format(Config(“RPA_UC035_04_Gainwell1_ExceptionBody”),{0}).ToString
it is throwing error
@Rakesh_Tiwari
You can just use Config(“RPA_UC035_04_Gainwell1_ExceptionBody”).ToString
Or using format
String.Format("{0}", Config(“RPA_UC035_04_Gainwell1_ExceptionBody”).ToString)
Hope this helps
i have this in asset
Hi Team,
Process is terminated due to a technical error - {0}
Please Resolve & Rerun the Process.
Best
Gainwell1 Bot
i am using this expression - String.Format(Config(“RPA_UC035_04_Gainwell1_ExceptionBody”),{0}).ToString
Okay @Rakesh_Tiwari
You have totally given the expression in a wrong way. Check below on get to know how to use this String.Format function.
Let’s say I have below expression,
String.Format("The total price of {0} {1}s is {2}.", quantity, itemName, totalPrice)
quantity, itemName and totalPrice are three variables which stores the data.
→ {0}: The first placeholder {0} is replaced by the first variable, which is quantity
→ {1}: The second placeholder {1} is replaced by the second variable, which is itemName
→ {2}: The third placeholder {2} is replaced by the third variable, totalPrice
- Assign -> quantity = "5"
- Assign -> itemName = "Apples"
- Assign -> totalPrice = "895 rs"
Then it will display
The total price of 5 Apples is 895 rs
Hope it helps!!
It doesn’t have the same number of columns, that’s why you’re getting this error. This error can’t be anything else. Debug and troubleshoot.
