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 / Add 1 to a column set ...
Power Automate
Unanswered

Add 1 to a column set as number

(0) ShareShare
ReportReport
Posted on by 16

Hello. 

So I am going to explain this as best I can in the hopes that someone here will have a really efficient way to complete this request. Its only condition is we can't use powers app as this is not supported for our organisation 

 

Current Flow

I have 2 lists Booking Data (List A) and Course Data (List B)

  1. When a new item is created in List A the flow "Gets Items" from List B filtered by the Course ID in List A.
    1. (List B has unique data and is sorted by Course ID)
  2. The next step is a condition where (using a conditional Y/N column in List B) the flow looks at if the spaces remaining is >1 in List B for the course.

And here in lies the predicament. The "spaces remaining" column in List B is a calculated column which takes the number the in Provisional Spaces Column (Whole Number) and Confirmed Spaces Column (Whole Number) away from its original number in the Spaces Remaining column.

 

What needs to happen is when a new item is created,  it will add 1 to the provisional spaces. My initial thoughts was to use add( ) with dynamic content however I keep getting various errors no matter what I try: 

 

"'The template language function 'add' expects its first parameter to be an integer, a float or a decimal number. The provided value is of type 'Null'."

&

"InvalidTemplate. Unable to process template language expressions in action 'Update_item_2' inputs at line '0' and column '0': 'The template language function 'add' expects its first parameter to be an integer, a float or a decimal number. The provided value is of type 'String'."

 

When I try to add a variable it doesn't let me pick the "Provisional Space" column from the Get Items - Course data.  I am missing something really obvious I know it but cannot seem to work out what this is.

 

jdncjhnhu46rtyh_0-1701781164928.png

 

 

Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,278 Most Valuable Professional on at

    @jdncjhnhu46rtyh 

    You can use an int() expression to convert the string to an integer.  That might address one of your issues.

     

  • jdncjhnhu46rtyh Profile Picture
    16 on at

    Does this need to be a separate action or can this be added straight into update items column? Assume I am very new to Power automate 🙂 

  • ScottShearer Profile Picture
    25,278 Most Valuable Professional on at

    @jdncjhnhu46rtyh 

    Great question!  Either way will work.  I suggest simply adding it to the Update item action.

     

  • jdncjhnhu46rtyh Profile Picture
    16 on at

    So you can use add( ) and Int( ) in the same expression in the update items?

  • ScottShearer Profile Picture
    25,278 Most Valuable Professional on at

    @jdncjhnhu46rtyh 

    Yes!  You can nest expressions.

    add([your value here], int([your string here]))

     

     

  • ScottShearer Profile Picture
    25,278 Most Valuable Professional on at

    @jdncjhnhu46rtyh 

    Yes!  You can nest expressions.

    add([your value here], int([your string here]))

     

     

  • jdncjhnhu46rtyh Profile Picture
    16 on at

    New Error

     

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

  • ScottShearer Profile Picture
    25,278 Most Valuable Professional on at

    @jdncjhnhu46rtyh 

    Take a look at the run - what is the string value that you are trying to convert?

     

  • jdncjhnhu46rtyh Profile Picture
    16 on at

    Hi Steve,

     

    I can see that the first output from Get Course Data is: 

    "Spaces_x0020_Remaining":"6.00000000000000",
    "Provisional_x0020_Spaces":0.0,
    "ApprovedSpaces":0.0,

     

     

     



  • ScottShearer Profile Picture
    25,278 Most Valuable Professional on at

    @jdncjhnhu46rtyh 

    Try using float() instead of int() please.

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 378 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 273 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 135 Most Valuable Professional

Last 30 days Overall leaderboard