Skip to main content

Notifications

Power Automate - Building Flows
Suggested answer

Troubleshooting a flow

Posted on by 6
Hi everyone.. First time on here and I'm not sure if anyone will respond. But I figured I'd try. 

I have a 365 account through my University and we use SharePoint as a daily go to for file sharing, references, etc. I have a task to keep track of the number of items that I have in an inventory. I have created a List to track the transactions from this stock and posted it on my SP site. However, I would like to have Power Automate keep tabs on the number of items I have left tin stock. Theoretically to automate a flow at some point that when my stock gets below a certain level, it will tickle someone to order more. 

I also have additionally a need to track the number of items that are being given away, to whom they are being given and by whom they are being given. I would like it so that each time someone either takes or replaces items from a stock, it keeps track of who, how many, etc on the SharePoint site.
 
I have a MS Lists set up to incorporate my data points. It allows me to enter the 
Date Date and Time  
Staff Choice  
# of Doses Number  
Transaction Type Choice  
Agency Lookup  
County Lookup  
Running Total Number
 
I have created a Power Automate flow to take in the number of items removed from the pile, but it seems like my calculations never seem to work. Currently for Withdraw, I have it as
 
"item/TransactionType/Value": "Withdraw",
"item/RunningTotal": "@sub(coalesce(triggerOutputs()?['body/RunningTotal'], 0)),int(triggerOutputs()?['body/triggerBody()?['#_of_Doses']'])"
 
It gives me the following error..

The input parameter(s) of operation 'Condition' contains invalid expression(s). Fix invalid expression(s) for the input parameter(s) of operation 'Condition'.

I will be the first to admit that I used ChatGPT to help me with the coding as I not a coder by any stretch of the immagination. But this seems to be something easily correced? I just dont see it.. Any help I could get would be greatly appreciated.

Chip
  • CF-25112151-0 Profile Picture
    CF-25112151-0 6 on at
    Troubleshooting a flow
    I appear to have gotten myself into a loop... Because since leaving the office a few hours ago, where you can see the Running Total was 500. That number is now 65,000. So it's incrementing the wrong thing. 
     
    What I would like to have is a CheckBook Register of sorts. So Deposits and Withdraws from this cache of supplies are logged and then the number of items (or balance of the account if you will) is reflected the last column.
  • CF-25112151-0 Profile Picture
    CF-25112151-0 6 on at
    Troubleshooting a flow
    Ok, so I removed the Coalesce stuff and boiled it down to a true false. It runs however, I the running total column (far right) to automatically calculate, based on either this was a withdraw or a deposit. 
    When the flow runs now I get the following error... Which makes me think that my table is not correct set up. Running Total is a Number column. Who does the calculating here? It is the Power Platform or is it Lists. My hope is to eventually build out this flow so that when that number drops below a certain par level, then a work flow is triggered to order more..

    You guys are awesome BTW, thanks so much..
     
    chip
     
    
    InvalidTemplate
    Unable to process template language expressions in action 'Update_item_1' 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.'.
  • Suggested answer
    CA1105 Profile Picture
    CA1105 222 on at
    Troubleshooting a flow
    Please share the screen shot of the flow and from your expression I'm assuming it could be because of coalace function. I would say create variable and store zero in that veriable and see if that fixes your issue. If there is something else then share more details.
  • CF-25112151-0 Profile Picture
    CF-25112151-0 6 on at
    Troubleshooting a flow
    Hey Thanks for reaching out.. Here's a screenshot
     
  • SudeepGhatakNZ Profile Picture
    SudeepGhatakNZ 14,107 on at
    Troubleshooting a flow
    Please upload a screenshot of your flow with error

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,532

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,050

Leaderboard