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
Thanks timl that works perfectly!
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)
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.