Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

(0) ShareShare
ReportReport
Posted on by 15

Hi, 

I created a flow to calculate test results and send email based on the pass or fail condition. When I run the flow I get the following error message at the condition. 

MehmoodQureshi_0-1666716880183.png

Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

 

I have this expression at the condition - 

 

MehmoodQureshi_1-1666716950376.png

float(outputs('Get_a_row')?['Body/Score'])
 
Please know that I dont have a coding or programming background but was tasked to created this flow for an internal quiz that we are supposed to roll out to a larger audience. Can you please help correct this error? 
Appreciate your help!

 

  • Pstork1 Profile Picture
    65,890 Most Valuable Professional on at
    Re: Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

    I assume by quiz you mean MS forms quiz.  In that case you need to either be the owner of the quiz or if it's a group form you need to copy the ID from the URL in MS Forms and input that manually into Power Automate.

  • MehmoodQureshi Profile Picture
    15 on at
    Re: Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

    Thank you for helping me out with this issue. I was able to rectify it. I have another unrelated question. In order for me to integrate a quiz with power automate, do I always need to be the owner of the quiz? 

  • MehmoodQureshi Profile Picture
    15 on at
    Re: Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

    MehmoodQureshi_0-1667492690352.png

    Compose output

     

    MehmoodQureshi_1-1667493041275.png

    I have the flow attached to a spreadsheet to calculate score. Do you think I need to make any changes to the cells of the spreadsheet? 

  • Verified answer
    Pstork1 Profile Picture
    65,890 Most Valuable Professional on at
    Re: Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

    I get that it passes the compose.  The point is to use that in the run log to see what value is being passed  for outputs(Get_a_row')?['Body/Score']) so that you can determine why it won't work with float().  I suspect there is something like the number being text or an integer that is causing the problem.  On the run where you get the error what is the actual value in the compose for that output?

  • MehmoodQureshi Profile Picture
    15 on at
    Re: Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

    Hi Pstork1, 

    I tried the compose multiple times. The flow passes the compose just fine but then throws the same error at the Condition for Float(outputs('Get_a_row')?['Body/Score'])

  • Pstork1 Profile Picture
    65,890 Most Valuable Professional on at
    Re: Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

    Use that Compose to see what the value is that you are running the condition on.  That should help you figure out why it can't be converted to a float.

  • MehmoodQureshi Profile Picture
    15 on at
    Re: Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

    Hey everone! I still need help with this error. I learned that no matter what the condition is (float, outputs, isfloat), I get the same error. I dont think the cause of the problem is at the condition level but I could be wrong..

  • MehmoodQureshi Profile Picture
    15 on at
    Re: Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

    Ahh it made sense! So did exactly what you told me to, but I still get the same error and warning at the condition. It passes the compose action just fine. Here is the screenshot...

    MehmoodQureshi_0-1666725522255.png

     

  • Pstork1 Profile Picture
    65,890 Most Valuable Professional on at
    Re: Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

    Just click on the plus inline right above the Condition action.  Then add a 'Compose' action.  Insert the same dynamic content field in the Compose that is in the left side of the Condition.

    image.png

    If the Condition is the first thing inside a loop then you won't have a plus above the Condition.  In that case add it just after the Condition and then Drag and Drop the Condition below the Compose after its added.

  • MehmoodQureshi Profile Picture
    15 on at
    Re: Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

    Can you help me with compose? I dont think I follow how to add it before the condition..

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,522 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,890 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow