Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Run flow if field is greater than 0

Posted on by 79

Hello,

 

First thank you to everyone who has offered help to me so far, you have really helped me get my app running.

 

I have one last function i have been asked to include and I'm stuck.

 

I need to run a power automate flow if a field value is greater than zero. the count field is a sum of text in a number of other fields.

 

When there is text in any of the counted fields the counter will sum the number of fields with text and if there is any fields with text i need to run a flow to export the text to a word file. I have the flow part sorted just can't work out how to only run it if the sum is greater than zero.

 

If(Value(count.Text)>0,Flow.Run(output.Text))

 

Sum field is called: Count.Text

Flow Name: Flow

Output to the flow: output.Text (not that this part really matters)

 

  • WarrenBelz Profile Picture
    WarrenBelz 143,591 on at
    Re: Run flow if field is greater than 0

    @Mclean2023 ,

    That is what I posted a few items back.

  • Verified answer
    Mclean2023 Profile Picture
    Mclean2023 79 on at
    Re: Run flow if field is greater than 0

    Got it to work.

     

    I renamed a bunch of fields and re did the flow. looks to be working correctly now with the below.

     

    If(Value(Justification.Text)>0,Justification_Output.Run

     

    @WarrenBelz thank you for taking the time to help me out, really appreciated:-)

     

  • Mclean2023 Profile Picture
    Mclean2023 79 on at
    Re: Run flow if field is greater than 0

    Also tried this:

     

    If(
    Sum(If(IsBlank(R1_1V), 0, 1),Sum(If(IsBlank(R1_2V), 0, 1)),Sum(If(IsBlank(R1_3V), 0, 1)),Sum(If(IsBlank(R1_4V), 0, 1)),Sum(If(IsBlank(R2_1V), 0, 1)),Sum(If(IsBlank(R2_2V), 0, 1)),Sum(If(IsBlank(R3_1V), 0, 1)),Sum(If(IsBlank(R3_2V), 0, 1)),Sum(If(IsBlank(R3_3V), 0, 1)),Sum(If(IsBlank(R3_4V), 0, 1)),Sum(If(IsBlank(R4_1V), 0, 1)),Sum(If(IsBlank(R4_2V), 0, 1)),Sum(If(IsBlank(R4_3V), 0, 1)),Sum(If(IsBlank(R4_4V), 0, 1)),Sum(If(IsBlank(R4_5V), 0, 1)),Sum(If(IsBlank(R5_1V), 0, 1)),Sum(If(IsBlank(R5_2V), 0, 1)),Sum(If(IsBlank(R6_1V), 0, 1)),Sum(If(IsBlank(R6_2V), 0, 1)),Sum(If(IsBlank(R6_3V), 0, 1)) > 0,Justification_Output.Run(R1_1V.Text,R1_2V.Text,R1_3V.Text,R1_4V.Text,R2_1V.Text,R2_2V.Text,R3_1V.Text,R3_2V.Text,R3_3V.Text,R3_4V.Text,R4_1V.Text,R4_2V.Text,R4_3V.Text,R4_4V.Text,R4_5V.Text,R5_1V.Text,R5_2V.Text,R6_1V.Text,R6_2V.Text,R6_3V.Text)

     

    Error Message:

    Mclean2023_0-1695076475885.png

     

  • Mclean2023 Profile Picture
    Mclean2023 79 on at
    Re: Run flow if field is greater than 0

    Thanks for your help.

     

    This is what the formula looks like in full still not working

     

    If(
    Sum(If(IsBlank(R1_1V), 0, 1),Sum(If(IsBlank(R1_2V), 0, 1)),Sum(If(IsBlank(R1_3V), 0, 1)),Sum(If(IsBlank(R1_4V), 0, 1)),Sum(If(IsBlank(R2_1V), 0, 1)),Sum(If(IsBlank(R2_2V), 0, 1)),Sum(If(IsBlank(R3_1V), 0, 1)),Sum(If(IsBlank(R3_2V), 0, 1)),Sum(If(IsBlank(R3_3V), 0, 1)),Sum(If(IsBlank(R3_4V), 0, 1)),Sum(If(IsBlank(R4_1V), 0, 1)),Sum(If(IsBlank(R4_2V), 0, 1)),Sum(If(IsBlank(R4_3V), 0, 1)),Sum(If(IsBlank(R4_4V), 0, 1)),Sum(If(IsBlank(R4_5V), 0, 1)),Sum(If(IsBlank(R5_1V), 0, 1)),Sum(If(IsBlank(R5_2V), 0, 1)),Sum(If(IsBlank(R6_1V), 0, 1)),Sum(If(IsBlank(R6_2V), 0, 1)),Sum(If(IsBlank(R6_3V), 0, 1))) > 0,
    Run(Justification_Output.Run(R1_1V.Text,R1_2V.Text,R1_3V.Text,R1_4V.Text,R2_1V.Text,R2_2V.Text,R3_1V.Text,R3_2V.Text,R3_3V.Text,R3_4V.Text,R4_1V.Text,R4_2V.Text,R4_3V.Text,R4_4V.Text,R4_5V.Text,R5_1V.Text,R5_2V.Text,R6_1V.Text,R6_2V.Text,R6_3V.Text)

  • Verified answer
    WarrenBelz Profile Picture
    WarrenBelz 143,591 on at
    Re: Run flow if field is greater than 0

    @Mclean2023 ,

    You needed Justification.Text, however an easier (and more reliable) way is to put the actual calculation in the label in your argument

    If(
     LabelCalculationHere > 0,
     Run(. . . . 

     

    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 the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • Mclean2023 Profile Picture
    Mclean2023 79 on at
    Re: Run flow if field is greater than 0

    Hi,

    Yes its a calculated label. Changed field to "Justification"

     

    Below still gives error

    Value(Justification > 0, Change.Run(R1_1V.Text)

     

    I changed the label to a number input field still same issue.

     

    Mclean2023_1-1695075344191.png

     

    Error details:

    Mclean2023_0-1695075294258.png

     

  • WarrenBelz Profile Picture
    WarrenBelz 143,591 on at
    Re: Run flow if field is greater than 0

    Hi @Mclean2023 ,

    What do you get if you put

    Value(Count.Text)

    on a Label when there is a value in the control - also I assume this is a Text control (or is it a calculated Label). Also Count is not a good name for a control - you might consider using something else.

     

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,591

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,090

Leaderboard