Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 9MtmUUD1Vpj4/msxlMWEpq
Power Automate - Building Flows
Unanswered

Increment Excel Column if Value specific Value in Forms selected

Like (0) ShareShare
ReportReport
Posted on 21 Feb 2025 12:14:06 by 2
I have a Microsoft Forms form which queries values in a predefined list.
The value that is passed should increase the value in an Excel table (ID, Key, Value) by 1 as soon as it is passed. 
I have created a flow that does the following: 
 
  • When a new response is submitted
  • Retrieve response details
  • Condition - was value XY passed? 
  • If yes
    • get row
    • update row
 
Here I use the following formula to increase the value: 
 
add(int(outputs('get_row')?['body/Counter']), 1)

The curious thing here is that this formula works for exactly one value. For all other values it throws the following error: 
 
Unable to process template language expressions in action 'Zeile_aktualisieren_-_Xing' 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.'.
 

 
The column of the table in which the value is to be increased by +1 is defined as “Number”. 
Does anyone have a solution for this problem? 
 
Kind regards
  • Infamous_Let Profile Picture
    155 on 21 Feb 2025 at 13:46:46
    Increment Excel Column if Value specific Value in Forms selected
    The error happens because the int() function expects a valid number, but for some rows, the value might be empty, null, or contain unexpected characters.
    A quick fix would be to use coalesce() to ensure there’s always a default value, like this:

    add(int(coalesce(outputs('get_row')?['body/Counter'], '0')), 1)
    This makes sure that if the column is empty, it defaults to 0 instead of causing an error.

    To see what’s actually being retrieved, you might want to add a Compose action before the update and check outputs('get_row')?['body/Counter']. That way, you can check if the issue comes from unexpected data.

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,518 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,699 Most Valuable Professional

Leaderboard