web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / getting Template langu...
Power Automate
Unanswered

getting Template language function 'item' must not have any parameters error after adding a function

(0) ShareShare
ReportReport
Posted on by 5

Hi All, I am new to power automate.

I built a flow that basically does this:

On form submission, it grabs certain selected fields and writes to a different excel file table. That part worked fine. I needed to add a feature where it needs to evaluate certain form fields for certain values and needs to write certain output values based on the conditions. I built a function expression, which does not give me an error when I check my flow, but the flow fails with the error upon running: 
"Unable to process template language expressions in action 'Add_a_row_into_a_table' inputs at line '1' and column '15822': 'The template language function 'item' must not have any parameters.'"

 

I exported and imported the flow, and I am pretty sure that is not the issue -since the flow works fine without the function. Its probably with the syntax of that function statement.

 

Here is the function statement:

if(or(equals(item(outputs('Get_response_details')?['body/rfabd17289f3b4dc9bae285dc5fcc1886']),'ENGL 121'), equals(item(outputs('Get_response_details')?['body/rb70aba84d6a24043921ca96a2f9d74cb']),'ENGL 121')),'6',if(or(equals(item(outputs('Get_response_details')?['body/r686b527f20aa4dacb1f3cc0d901d77e4']),'ENGL 099/121'),equals(item(outputs('Get_response_details')?['body/rfabd17289f3b4dc9bae285dc5fcc1886']),'ENGL 099/121'),'5',if(equals(item(outputs('Get_response_details')?['body/r686b527f20aa4dacb1f3cc0d901d77e4']),'ENGL 095'),'4','5'))))
 
which should be equivalent to excel logic:
IF(OR(equals(AH2, "ENGL 121"), equals(AJ2, "ENGL 121")),6,IF(OR(equals(AF2, "ENGL 099/121"),equals(AH2, "ENGL 099/121"),5,IF(equals(AF2, "ENGL 095"),4,'5'))))
 
which is basically,
if
AH2 = ENGL 121 or AJ2 = ENGL 121
output 6
else if
AF2 = ENGL 099/121 or AH2 = ENGL 099/121
output 5
else if
af2 = ENGL 095
output 4
else 
output 5
 
I can't figure out where is the issue in my FX statement that it is throwing this error. Any help is appreciated!!
Categories:
I have the same question (0)
  • Verified answer
    Paulie78 Profile Picture
    8,422 Moderator on at

    Perhaps I have it wrong because I cannot easily test your scenario, but I don't think you need the item expression at all, this might work...

    if
    (
     or
     (
     equals(outputs('Get_response_details')?['body/rfabd17289f3b4dc9bae285dc5fcc1886'],'ENGL 121'), 
    	equals(outputs('Get_response_details')?['body/rb70aba84d6a24043921ca96a2f9d74cb'],'ENGL 121')
     ),'6',
     if
     (
     or
    	(
    	 equals(outputs('Get_response_details')?['body/r686b527f20aa4dacb1f3cc0d901d77e4'],'ENGL 099/121'),
    	 equals(outputs('Get_response_details')?['body/rfabd17289f3b4dc9bae285dc5fcc1886'],'ENGL 099/121'),'5',
    	 if
    	 (
    	 equals(outputs('Get_response_details')?['body/r686b527f20aa4dacb1f3cc0d901d77e4'],'ENGL 095'),'4','5'
    	 )
    	)
     )
    )

     

    Please...

    If I answered your question Accept it as a solution ✔️ 

    If I helped you out, please give me some Kudos 👍

    Thanks 😙

  • telesamad Profile Picture
    5 on at

    Paulie, 

    Thanks so much! Your solution worked!!!

    MS documentation was pointing me to use the item expressions.

     

    You saved me a ton of wasted hours and agony.

  • KProuty Profile Picture
    178 on at

    I am trying to do this for one item and not many items in a list.

    I was able to successfully send an email with the table of the item, but it needs to be transposed. I tried this solution and it failed with the error:

     

    Unable to process template language expressions in action 'Append_to_array_variable' inputs at line '0' and column '0': 'The template language function 'item' must not have any parameters.'.

     

    On the Apply to Each Transpose step.

     

    (FYI, I'm not a programmer but a power user, but nonprofits work with the human resources they have.)

    I have many more "fields" than in this example that you gave.

     

    In your screenshot, you have the following:

     

    first(split(item('Apply_to_each'),':')) 
     
    Is this really written out 'Apply_to_each' or am I missing a variable that should go in there?
    KProuty_0-1651783801665.png

     

    KProuty_1-1651783855215.pngKProuty_2-1651783890895.pngKProuty_3-1651783960510.png
    split(replace(replace(replace(replace(replace(string(variables('MakeItemDataintoArray')),'[',''),']',''),'"',''),'{',''),'}',''),',')
     
    first(split(item('Apply_to_each'),':'))
     
    Any help appreciated!!
     
    I have to make this data readable in an email.

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard