Recently, we have come across the requirement to have a field store multiple records from the user table. Then, once they are stored, the emails were to be extracted and added to the TO and CC fields of a email sent from Power Automate.

Firstly, we have to set the variables – in this example, we will be using Attendees and Apologies for meeting notes captured in the system, as well as being automatically sent out.

This requires us to have two Initialize Variables steps.

Now that we have initialized the variables, we will need to do a Get a row by ID action

Next we will need to get our JSON that is generated from our PCF. From our initial Dataverse action of When a row is added, modified or deleted, we have a look at our orby_meetingattendees field, and extract the value

[{"text":"Daniel Utkovic","secondaryText":"daniel@orby.com.au"},{"text":"Orby Test","secondaryText":"orbytest@orby.com.au"}]

Now that we have the value that is being generated, we will need to create a Parse JSON action for our flow, and paste the above line to format the schema for us. This can be done also by selecting the Generate from sample button.

Now that we can format and make sense of the data coming through, we need to add the emails to an array. By doing this we will:

  • Create an Apply to each action
  • Under Select an output from previous steps, we will be selecting the secondaryText under Parse Attendees JSON in Dynamic Content
  • Finally, we will need to add these values to the array which is done by creating an Append to array variable action.

Now that we have the data captured and formatted in a way that we can work with, the final step is the add these array of emails to a field. Since emails in an email field have a ; delimiter, we will use the following expression to join and format the emails:

Join(variables(‘Attendees’),’;’)

The above can be used anywhere this data needs to be made visible or available.