How to Extract Multiple Values from a Single Entity in a UiPath Comm Mining Use Case?

Hi UiPath Community,

I’m working on a use case involving communication mining where I need to extract multiple values from the transaction item. The transaction item consists of various entities, and some entities may have multiple values. Currently, I’m able to fetch one value per entity, but I need to extend this functionality to capture all available values for each entity.

Steps I’ve Implemented:

  1. Iterating over the email stream.
  2. Using a For Each loop to iterate over the list of entities.

Problem:

For each entity, I want to extract all values associated with it. I’ve checked the documentation on the UiPath portal, but I couldn’t find specific guidance on how to handle entities with multiple values.

For example, with the policy number entity, the documentation shows how to handle a single value. I need to know how to modify my approach to fetch all values associated with this entity.

Could anyone provide guidance or examples on how to implement this? Any help or direction to relevant documentation/examples would be greatly appreciated!

reference: Communications Mining - Using Entities in your Application

Hi~
You can extract number via invoke VBA

code as follow:

Imports System.Text.RegularExpressions  
  
Public Function ExtractSpecialFields(inputText As String) As List(Of String)  
    Dim pattern As String = "[A-Z]{3}-\d{8}"  
    Dim matches As MatchCollection = Regex.Matches(inputText, pattern)  
    Dim result As New List(Of String)  
      
    For Each match As Match In matches  
        result.Add(match.Value)  
    Next  
      
    Return result  
End Function

hi @ashokkarale , @Anil_G
do you have any idea , how can i save multiple values from a list of entities. containing single entity = policy number and policy number has multiple values.

for refernece: i am fetching the value stored in formated value from the list of entities already. where entity type is policy number

but how can i fewtch multiple values present in policy number.

thanks in advance

Hi @Jason.Li thanks for your reply

i am not looking for a Regex way , because i already have a solution to get first value from formatted values of current entity where type is policy number

the image i have assigned is the kind of answer i am looking for.

thanks in advanc3ee.

@Avyan.Sharma,

Sorry, not sure on this!

Thanks,
Ashok :slight_smile:

1 Like

@Jason.Li

Can you please tell the transactionitem type…

From there we can explore

Cheers

hi @Anil_G its UiPath.communicationsmining.Activities.Streams.Model.Result

@Avyan.Sharma

Can you try this I hope this what you are lookign at

String.Join(",",cm.Entities.Where(function(x) x.Kind.Equals("Policy Number")).Select(function(x) x.FormattedValue))

cheers

1 Like

thanks for the help appreciate it

1 Like

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