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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

The value cannot be converted to the target type.

(0) ShareShare
ReportReport
Posted on by 108

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

 

I have a SP List 1 (Leave Entries) and SP List 2 (Leave Balances), I am simply trying to add the new entry ( Whole Days) from List 1 to another column in List 2 (CY Used) but get the above error. I have tried wrapping expression with & without 'int' and 'float' -  My flow is below - I appreciate any assistance with this flow or suggestions to do the same thing a different way? it is really frustrating that I cannot fix.

 

 

 

Flow Pt 1.jpg

 

Flow Pt 2.jpg

Flow Error.jpg

I have the same question (0)
  • Mitanshu Profile Picture
    1,644 Moderator on at
    Re: The value cannot be converted to the target type.

    After Flow run, (that gives failure) can you please expand Compose 3 and show us what is the result you are getting there?

  • UluruRob Profile Picture
    108 on at
    Re: The value cannot be converted to the target type.

    @happyume Please see below for Compose 3 result, Thanks.

     

    UluruRob_0-1634110188291.png

     

  • Mitanshu Profile Picture
    1,644 Moderator on at
    Re: The value cannot be converted to the target type.

    You have written all your formulas as plain text and hence you are seeing failure.

     

    Either write the formula in the Dynamic Content window within the Expression tab, or put your formula as below:

     

    @{ YOUR_FORMULA }

     


    This applies to your Compose and Compose 2 actions as well.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

  • UluruRob Profile Picture
    108 on at
    Re: The value cannot be converted to the target type.

    Now I have corrected all formulas I believe and created them in the expression builder (see first image), then ran flow and now receive this error at Compose 3?(see second image) If I am still writing the expression wrong please show me the correct formula.

     

    UluruRob_1-1634112742939.png

    UluruRob_2-1634112801064.png

     

  • Verified answer
    Mitanshu Profile Picture
    1,644 Moderator on at
    Re: The value cannot be converted to the target type.

    Under Compose 3, can you please try:

    You have already converted Compose and Compose 2 into int, so no real need to do this again

     

    @{add(outputs('Compose'),outputs('Compose_2'))}

     

     

    If you do want to explicitly convert to int before add, then use:

     

    @{add(int(outputs('Compose')),int(outputs('Compose_2')))}

     


    Notice that I am using outputs('Compose') within int() and then outputs('Compose_2') in another int() - so my position of closing circular bracket ) is different.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

  • UluruRob Profile Picture
    108 on at
    Re: The value cannot be converted to the target type.

    Thankyou the below formula worked and the flow works now, can you explain please what adding the wrapping 

    @{ YOUR_FORMULA }

     means? Why doesn't the system accept the expression as written in the expression builder and allow it to save without error?

    @{add(outputs('Compose'),outputs('Compose_2'))}

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 659 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 386 Moderator

#3
chiaraalina Profile Picture

chiaraalina 290

Last 30 days Overall leaderboard