Want to name based on the document type name in taxonomy manager

So i am using document understanding , I want to dynamically name my resultant excel files based on the document type name in taxonomy manager . Do not know how to do it

Hi @19bcs1138 ,

Dynamically naming your resultant Excel files based on the document type name in the Taxonomy Manager in UiPath can be achieved through a combination of activities that extract the document type and then use that information to name the file accordingly.

Ensure you have your document types defined in the Taxonomy Manager.
Use the Digitize Document activity to convert the document into a format that can be processed.
Use the Classify Document activity to identify the document type.

In the classify document activity, you can use keyword based classifier or intelligent keyword classifier to classify the document type. you will get the results in to an array called classification results, from that you can use the below syntax to get the document type and assisgn it to a variable.

ClassificationResults(0).DocumentTypeId\

After that, you can put a condition to name your excel file

If you are using the Document Understanding Process framework, you can edit the “70_Export.xaml” workflow and customize your output path by e.g. including in_ExtractionResults.ResultsDocument.DocumentTypeName in the name.

For example:

Path.Combine(in_config("ExportsFolder"), in_ExtractionResults.ResultsDocument.DocumentTypeName + "_" + path.GetFileNameWithoutExtension(in_ExtractionResults.DocumentId) + "_" + (in_ExtractionResults.ResultsDocument.Bounds.StartPage + 1).ToString + "-"+(in_ExtractionResults.ResultsDocument.Bounds.StartPage + in_ExtractionResults.ResultsDocument.Bounds.PageCount).ToString + ".xlsx")