Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Submit form notify or launch

Posted on by 73

Hi I've got a sharepoint form and though a submit button added within powerapps I'm trying to generate a notification in the banner if any of my mandatory fields are blank or launch to a new page if their all filled out and the form is actualy submitted. This is what I've got (which doesn't throw up any formula errors but doesn't actually do anything:

 

SubmitForm(SharePointForm1);

'Live-UpdateTracker'.Run(SharePointForm1.LastSubmit.ID);

If(Or(IsBlank(DataCardValue2.SelectedItems),IsBlank(DataCardValue2.SelectedItems),IsBlank(DataCardValue3.SelectedDate),IsBlank(DataCardValue4.SelectedItems),IsBlank(DataCardValue6.Text),IsBlank(DataCardValue12.Text),IsBlank(DataCardValue13.Text),IsBlank(DataCardValue14.Text),IsBlank(DataCardValue15.SelectedItems)),
 Notify("The Required field could not be blank, please provide a value for it", NotificationType.Error),Launch("...address.......",{},LaunchTarget.Replace))

 

Can anyone point out where I've gone wrong? Cheers

  • WalesMariner Profile Picture
    WalesMariner 73 on at
    Re: Submit form notify or launch

    Thanks timl that works perfectly!

  • Verified answer
    timl Profile Picture
    timl 32,024 on at
    Re: Submit form notify or launch

    Hi @WalesMariner 

    I'm not sure exactly where the problem is. However, the preferred way to do this is to set the OnSelect property of your button to this.

    If(
     Or(
     IsBlank(DataCardValue2.SelectedItems),
     IsBlank(DataCardValue2.SelectedItems),
     IsBlank(DataCardValue3.SelectedDate),
     IsBlank(DataCardValue4.SelectedItems),
     IsBlank(DataCardValue6.Text),
     IsBlank(DataCardValue12.Text),
     IsBlank(DataCardValue13.Text),
     IsBlank(DataCardValue14.Text),
     IsBlank(DataCardValue15.SelectedItems)
     ),
     Notify("The Required field could not be blank, please provide a value for it", NotificationType.Error),
     SubmitForm(SharePointForm1)
    )

    In the OnSuccess property of SharePointForm1, you would apply the following formula:

    'Live-UpdateTracker'.Run(SharePointForm1.LastSubmit.ID);
    Launch("...address.......",{},LaunchTarget.Replace)

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