Skip to main content

Notifications

Community site session details

Community site session details

Session Id : GrDXHaprG2L0W56ZLONH7V
Power Automate - Building Flows
Unanswered

Unable to process template language expression

Like (1) ShareShare
ReportReport
Posted on 4 Nov 2022 16:36:36 by 7

I've got the above error when building a long-ish flow based on a prototype that worked fine. The full error message is this:

 

Unable to process template language expressions in action 'SetBusinessAreas' inputs at line '0' and column '0': 'The template language function 'json' parameter is not valid. The provided value 'GetBusinessAreas' cannot be parsed: 'Unexpected character encountered while parsing value: G. Path '', line 0, position 0.'.

 

It occurs at this step in my flow:

ColinH_0-1667579366742.png

The idea is to format the response to a multi-option question in MS Forms so that it can be written to a similar column in a SharePoint list. The parameters set in GetBusinessAreas and SetBusinessAreas are as follows:

 

ColinH_1-1667579582313.png

As mentioned above, I've had a smaller prototype using these actions working fine. Whatever the issue is, I'll be able to apply it to 4 more similar constructs prior to creating my item in SharePoint. Any ideas, folks?

 

 

 

 

 

 

 

 

 

 

 

 

  • ColinH Profile Picture
    7 on 07 Nov 2022 at 09:29:19
    Re: Unable to process template language expression

    Hi abm

     

    Thanks for taking the time to offer a solution to my issue. I checked my flow again this morning prior to rebuilding as per your suggestion and found the problem. I'd forgotten to include the 'outputs' method in my json expression for the "SetBusinessAreas" step. It originally looked like this:

     

    json('GetBusinessAreas')

     

    But should have looked like this:

     

    json(outputs('GetBusinessAreas'))

     

    I've now come across another glitch in a different step that I'll try to resolve myself (pretty new at this game). Thanks again đꙂ

     

  • abm abm Profile Picture
    32,464 Most Valuable Professional on 04 Nov 2022 at 19:29:40
    Re: Unable to process template language expression

    Hi @ColinH 

     

    Please try the following: 

     

    image.png

     

    Above expression is as follows:

     

    split(replace(replace(outputs('Get_response_details')?['body/r93fb915c632344b2bf4d8e0077a37509'],'[',''),']',''),',')
     
    Here I am collecting the multiple choice form response values, replacing those square brackets and use split for iterating each item.
     
    image.png
     
     
    See the compose 2 above. That's the format we need for SharePoint multi-choice column to update.
     
    Finally, outside the loop map the array variable 'MultiSelectedValues' under the SharePoint update or create item action step.
     
    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,776 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,093 Most Valuable Professional

Leaderboard
Loading started