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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Updating SharePoint Li...
Power Automate
Answered

Updating SharePoint List: Volunteer Count

(0) ShareShare
ReportReport
Posted on by 239

Hi, 

 

I have a SharePoint list that I am using to limit volunteer sign ups. Where I have hit a snag is updating the 'Spots Filled' field for the opportunity. I tried using the add expression, but it didn't work. I get this error message: 

 

InvalidTemplate. Unable to process template language expressions in action 'Update_item' 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 'Object'. Please see https://aka.ms/logicexpressions#add for usage details.'.

 

 

SharePoint list DOP.jpg

DOP-Flow.jpg

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,768 Most Valuable Professional on at

    Hi @gfeldhake,

     

    What was the expression you tried to use? Was it something like below or did you use something different?

     

    add(triggerOutputs()?['body/SpotsFilled'], 1)

     

     

  • GF-02121351-0 Profile Picture
    239 on at

    The expression you shared is what I tried. 

  • GF-02121351-0 Profile Picture
    239 on at

    I added the opportunity to the update item, and I now get this error: 

     

    InvalidTemplate. Unable to process template language expressions in action 'Update_item' 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 'Null'. Please see https://aka.ms/logicexpressions#add for usage details.'.

  • Expiscornovus Profile Picture
    33,768 Most Valuable Professional on at

    Hi @gfeldhake,


    Can you share a screenshot of the rest of your cloud flow setup? I am interested to see what your trigger action is.

     

    I also assume in your setup you have another action which points to the Volunteers count list? Somewhere in the flow you should have an action which retrieves the current values of the Spots Filled. Otherwise the flow is not aware of the current value and cannot add 1 spot to it.

  • GF-02121351-0 Profile Picture
    239 on at

    Here you go: 

     

    DOP Full Flow.png

  • Expiscornovus Profile Picture
    33,768 Most Valuable Professional on at

    Hi @gfeldhake,

     

    Thanks for sharing that screenshot. I see you are using a Get Items. So in this case you don't want to retrieve the field from the triggerOutputs (which is a Forms action). 

     

    Since the update item action is within a loop (which uses the value field of the Get Items) you can either use an items or item function instead.

     

    Can you try the below as an expression?

    add(item()?['SpotsFilled'], 1)

     

     

  • GF-02121351-0 Profile Picture
    239 on at

    Thank you, that did update my SharePoint list. howerver, it updated every item in the list not just the ones that were selected in the form. 

     

    Any thoughts on how to fix that? 

  • Expiscornovus Profile Picture
    33,768 Most Valuable Professional on at

    Hi @gfeldhake,

    Yes, use a Filter Query in the Get Items action. This way you will only retrieve the correct item (to update) of your Volunteer Counts list.

     

    Below is an example

     

     

    Opportunity eq 'yourquestionfield'

     

     

    volunteercounts_filterquery.png

  • GF-02121351-0 Profile Picture
    239 on at

    That worked, it pulls the correct items, but it stops the flow after it gets the items. Do you think it stopped reading the total spots and spots filled columns? 

     

    Web capture_20-12-2022_114957_make.powerautomate.com.jpeg

  • Expiscornovus Profile Picture
    33,768 Most Valuable Professional on at

    Hi @gfeldhake,

     

    I see in your screenshot your question allows multiple selections as answers. That makes it slightly more complicated. Let me have a look how we can solve this 😁

     

    multipleanswers_question.png

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 251 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 239

#3
Expiscornovus Profile Picture

Expiscornovus 220 Most Valuable Professional

Last 30 days Overall leaderboard