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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / how to navigate to suc...
Power Apps
Unanswered

how to navigate to success screen if form is submitted successfully and notify error

(1) ShareShare
ReportReport
Posted on by 62

I have this code to show error when if any and navigate if it patched successfully. however, it only shows an error message when there is an error. how can I show notify on success and navigate to other screens?

IF(
CountRows(
Filter(
'LOC SEW activity report',
'Type of Activity' = Dropdown3_1.Selected.Activities,
'Employee Name' = ComboBox2.Selected.Value,
Date = Dateselection.Selected.Value
)
) = 0,
Patch(
'LOC SEW activity report',
Defaults('LOC SEW activity report'),
{Wage: DataCardValue3_1.Text * Text(Piecerate_1.Selected.'Piece Rate')},
{'E. ID': Dropdown2_3.Selected.'Employee ID'},
{'Employee Name': ComboBox2.Selected.Value},
{'Type of Activity': Dropdown3_1.Selected.Activities},
{Date: Dateselection.Selected.Value}
),
Notify(
"This payment already processed",
NotificationType.Error,5000
);
//Navigate('success screen'); Set(startTimer, true)
Notify("Payment done", NotificationType.Success,5000)
);

Categories:
I have the same question (0)
  • KeithAtherton Profile Picture
    3,705 Most Valuable Professional on at

    Hi @Gizachew,

     

    That code appears to have the following logic in pseudo code:

    If my condition is true
     Create new record
    Else
     Notify "This payment already processed"
     Start timer
     Notify "Payment done"

     

    Consider re-writing the code to perform something like this:

    If my condition is true
     Create new record
     Notify "Done"
     Navigate to success screen
    Else
     Notify "This payment already processed"

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    Follow me online.

  • Verified answer
    WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @Gizachew ,

    Try this

    If(
     CountRows(
     Filter(
     'LOC SEW activity report',
     'Type of Activity' = Dropdown3_1.Selected.Activities,
     'Employee Name' = ComboBox2.Selected.Value,
     Date = Dateselection.Selected.Value
     )
     ) > 0,
     Notify(
     "This payment already processed",
     NotificationType.Error,5000
     ),
     Patch(
     'LOC SEW activity report',
     Defaults('LOC SEW activity report'),
     {
     Wage: DataCardValue3_1.Text * Text(Piecerate_1.Selected.'Piece Rate'),
     'E. ID': Dropdown2_3.Selected.'Employee ID',
     'Employee Name': ComboBox2.Selected.Value,
     'Type of Activity': Dropdown3_1.Selected.Activities,
     Date: Dateselection.Selected.Value
     }
     );
     Navigate('success screen'); 
     Set(startTimer, true);
     Notify(
     "Payment done", 
     NotificationType.Success,
     5000
     )
    );

     

    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

  • Gizachew Profile Picture
    62 on at

    Great thanks it works now.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard