Hello everyone I’m trying to get first item of an item of Uipath.DocumentProcessing.Contracts.Results.ClassificationResults but I do not know how to call it,
My variable name is out_ClassificationResults,
I have tried -out_ClassificationResults(0) and out_ClassificationResults.First() and out_ClassificationResults.Any()- but It said It couldn’t convert 1d array,
Can anyone help me how to get the first item of classification result and assign it to another ClassificationResults array?
Hi @hamit.dinc-ext
Can you share the screenshot of the compiler error.
Also what are the data types of the the variables used.
Uipath.DocumentProcessing.Contracts.Results.ClassificationResults is the type,
Error ERROR Validation Error Compiler error(s) encountered processing expression “out_ClassificationResults.First()”.
Value of type ‘UiPath.DocumentProcessing.Contracts.Results.ClassificationResult’ cannot be converted to ‘1-dimensional array of UiPath.DocumentProcessing.Contracts.Results.ClassificationResult’. Framework/30_Classify.xaml
@hamit.dinc-ext
Please share the screenshots of your workflow
I’m sorry I can not share workflow due to restictions but it’s only :
Classify Document Scope and it is one of its parameters
@hamit.dinc-ext
If you are facing this issue here
![image](https://global.discourse-cdn.com/uipath/original/4X/a/2/8/a286398cf441f818548ace6bfc4f7c88a478b958.png)
then ClassificationResults(0) should solve the problem
![image](https://global.discourse-cdn.com/uipath/original/4X/3/f/d/3fd1375f23578b5ab64c7a19e3d29854379a4b96.png)
The data type of ClassificationResults is
![image](https://global.discourse-cdn.com/uipath/original/4X/0/d/4/0d40e54f3c15e0517fb3d993f14920e4e7bb33d4.png)
Do check the scope of the variable also.
Thank you for this,
Last Question how to initialize a new
UiPath.DocumentProcessing.Contracts.Results.ClassificationResult[]
variable?
Hi again,
I have solved issues and I can get the first of of it thank you for help,
I have one more question,
I’m using Classify Document Scope activity for extracting PDF files and I have 16 vendors so It gets pdfs which are more than 1 page and It tries to classify all pages like → page_1 is vendor_1 , page_2 is vendor_2 but they actally are same vendors and page_2 most of time has missing values because page_1 already is the header of this PDF and it contains header data like “name” etc,
All I want is that needs to be considered as one_page pdf.
Because whenever it finds two ClassificationResults as array then it extracts pages one by one and it makes trouble for us,
I do not know how to prevent that illogical situation?
Do you have any idea?