TerenceJackson
TerenceJackson

Reputation: 1786

PowerApps: Notify user after succesfull run of flow

I have a Canvas PowerApps which runs a flow on click on a button. The Flow is responding with True in case it was successfull and False if there was an error. enter image description here

In my Canvas app I am having the following code on "onSelect" of the button:

If(
Flow.Run(TextInput1, NumberInput1, NumberInput2, NumberInputSecurityHotspots, NumberInput3, NumberInput4).success,
Notify("Data submitted succesfully",NotificationType.Success,2000),
Notify("Error occurred, please contact your administrator",NotificationType.Error,5000)
)

enter image description here

I am expecting, that after the flow has run either one Notify is triggered, but nothing happens.

I have also tried to display/hide text or icons based on the output, but also this did not work. So somehow thw IF statement is not working as intended.

What am I missing to make it work?

Upvotes: 0

Views: 2313

Answers (1)

Ganesh Sanap - MVP
Ganesh Sanap - MVP

Reputation: 2198

"Respond to a PowerApp or flow" action returns values in "string" / text formula. Hence, you have to use the formula in below format:

If(
    Flow.Run(TextInput1, NumberInput1, NumberInput2, NumberInputSecurityHotspots, NumberInput3, NumberInput4).success = "True",
    Notify("Data submitted succesfully",NotificationType.Success,2000),
    Notify("Error occurred, please contact your administrator",NotificationType.Error,5000)
)

Upvotes: 1

Related Questions