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 / Unable to process temp...
Power Automate
Answered

Unable to process template language expressions in action 'Create_item' inputs 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 3,506

I have the following parsed JSON:-

{
 "?xml": {
 "@version": "1.0",
 "@encoding": "utf-8"
 },
 "RepeaterData": {
 "Version": null,
 "Items": {
 "Item": [
 {
 "ArticleInput": {
 "@type": "System.String",
 "#text": "33333333"
 },
 "ArticleDescription": {
 "@type": "System.String",
 "#text": "desc33333"
 },
 "ArticleReturnable": {
 "@type": "System.String",
 "#text": "YES"
 },
 "Qty": {
 "@type": "System.Double",
 "#text": "1"
 }
 },
 {
 "ArticleInput": {
 "@type": "System.String",
 "#text": "33333333"
 },
 "ArticleDescription": {
 "@type": "System.String",
 "#text": "desc33333"
 },
 "ArticleReturnable": {
 "@type": "System.String",
 "#text": "YES"
 },
 "Qty": {
 "@type": "System.Double",
 "#text": "11"
 }
 }
 ]
 }
 }
}

 

now i want to create a sharepoint list item, and assign the Qty field, so i tried the following formula:-

 

float(items('Apply_to_each_2')?['Qty'])

but i got this error:-

 

Unable to process template language expressions in action 'Create_item' inputs 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.'.

Categories:
I have the same question (0)
  • Verified answer
    Rhiassuring Profile Picture
    8,690 Moderator on at

    Hi there, 

    It looks like you are trying to apply your float to an Object (Qty), rather than to the "#text" inside of each Qty. 

    I was able to get the Qty text out with this:

     

    float(body('Parse_JSON')?['RepeaterData']?['Items']?['Item'][1]?['Qty']?['#text'])


    (Parse_JSON is because I initialized a variable with your JSON payload, then parsed it, and used that. I selected the "Items" from the parsed JSON into the Compose.)

    You can see that I have a "1" in there - you'd need to do an "Apply to each" on that bad boy with an incremented value.

    I hope that helps.

    Cheers,

    Rhia
  • Paabl00 Profile Picture
    9 on at

    In the event that the error is the same but the field is of type date, which is what should be done??

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

     

    THIS IS THE EXPRESSION

    formatDateTime(addDays('1900-01-01',add(int(item()?[<FIELD NAME>]),-2)),'MM/dd/yyyy')
     
    Please Help

     

     

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard