QuestionQ121Verified/Document UnderstandingCopy linkReport a problemAsk AstroTutorSave questionHow can you load a taxonomy from a supplied non-default text-file location into a variable? Drag the steps from the left to the right in the correct order.Drag & DropUse the Read Text File activity on the most recent variable created. Next, create a new variable "taxonomyText", then save the output of the Read Text File activity to "taxonomyText". Then, add an Assign activity and set the "Save To" property to the first variable you created.Create a new variable of type "DocumentTaxonomy" called "documentTaxonomy", then create a new string variable called "taxonomyPath".Using an Assign activity, assign the given non-default taxonomy text file path to the most recent variable created.Inside the last Assign activity "Value to Save" property add the following expression: "Newtonsoft.Json.JsonConvert.DeserializeObject(Of DocumentTaxonomy)(<mostRecentVariableCreated>)" *where <mostRecentVariableCreated> is the most recent variable you created.FirstSecondThirdFourthShow AnswerAnswerExplanationA file path must be assigned before Read Text File can retrieve its contents. The retrieved taxonomy JSON is stored in taxonomyText, then deserialized and assigned to the DocumentTaxonomy destination. DocumentTaxonomy.Deserialize converts serialized taxonomy text into a DocumentTaxonomy object.Learn moreUiPath DocumentTaxonomy ClassUiPath Taxonomy OverviewShow comments1Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion