Forum Discussion

Davide Picone's avatar
Davide Picone
Copper Contributor
Dec 28, 2017

Flow doesn't process multiple value in custom list

I created a basic Flow to generate an email when a new item is created on a Custom list.

The flow works without problems until I add a Multiple Choice or Lookup to a multiple choice field.

 

The error I receive when the flow runs is:

 

InvalidTemplate. Unable to process template language expressions in action 'Send_Email' inputs at line '1' and column '2175': 'The template language expression 'triggerBody()?['Tasks']?['Value']' cannot be evaluated because property 'Value' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details.'.

 

 

 

 

5 Replies

  • Sergey Karpov's avatar
    Sergey Karpov
    Copper Contributor

    Here is one workaround:

    1. Create variable called, for example, test1;

    2. Create variable called, for example, test2;

    3. Set test1 variable to your multiple choice field value (it will be automatically put in "Apply to each"):

       3.1. Name = test1 variable + delimiter (in my case delimiter is coma);

       3.2. Value = yuor multiple choice field.

    4. Right after setting test1 variable add action "Append to string variable":

       4.1. Name = test2 variable;

       4.2. Value = test1 variable.

    5) Put output of "Append to string variable" wherever you need.

    See screenshot with example.

    • Lachlan Hughes's avatar
      Lachlan Hughes
      Copper Contributor
      A bit of a long way to do it, but works perfectly.
      As a side not, you only need one "test1" variable if you are doing this to multiple multiple choice fields
      ie
      create test1
      create choiceField1
      create choiceField2
      create choiceField3

      Apply to each
      Name = test1 variable
      Value = your multiple choice field + delimiter (in my case delimiter is coma);
      Right after setting test1 variable add action "Append to string variable":
      Name = choiceField1 variable;
      Value = test1 variable.

      etc
    • Robert Woods's avatar
      Robert Woods
      Iron Contributor

      Thanks but the document I linked to back in January worked just fine.

  • Robert Woods's avatar
    Robert Woods
    Iron Contributor

    Davide Picone

     

    Please read over this thread. I spent about 2 weeks working on this and ultimately Flow Support forums could not fix the issue and said multiple choice value fields are unsupported at this time in flow.

     

    https://powerusers.microsoft.com/t5/General-Flow-Discussion/SharePoint-list-submission-notification-flow-cant-add-fields/td-p/72861

     

     

    I did not want to accept this as an answer as this had worked for me for multiple months up to the change about a month and a half ago.

     

    I have an open support ticket with Microsoft through our Enterprise Agreement now to investigate. They agree that functionality should not have been removed in an update and are currently investigating. It has been about a week since I heard back from my case worker.

    • Robert Woods's avatar
      Robert Woods
      Iron Contributor

      Hi Robert,

       

      Product team investigated regarding the issue and confirmed that due Choice column with multiple values allowed is an array, and hence flow is converting the action into “Apply to each” loop. Please verify if your column, and verify if it is same as shown in attached screen shot.

      As a workaround, product team is suggesting to use “Compose” action instead and use “concat” function to avoid looping. While sending email use the

      Please find the below link regarding concat and “Join” operation.

      https://docs.microsoft.com/en-us/flow/data-operations

       

      Regards,

      Narender Reddy Satty

      Engineer - Microsoft Business Intelligence

Resources