cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Glueck
Frequent Visitor

How to control Save button in PowerApps using Sharepoint List

Hello.  I am builidng custom form in PowerApps using Sharepoint List. And I set Email notification by Automate to check each status.

 

Flow:

1.HR input new staff's information

2.Manager update if they need PC/mobile/ PC Delivery date etc.

3.IT update ID status/PC order status/Mobile# 

 

Status and set Email notification in PowerAutomate "When an item is created or modified"

1.In progress by Manager (Button: Submit to Manager)

2.In progress by HR (Button: Send to HR )

3.In progress by IT (Button: Approved by HR)

4.Completed (Button: Completed)

 

Form created

1.New Screen

2.Edit Screen

3.View Screen

 

Then, I set for Onsave as below.

If(SPFormMode="New",SubmitForm(NewForm1),SubmitForm(EditForm1));
If(SPFormMode="New",ResetForm(NewForm1),ResetForm(EditForm1));ResetForm(ViewForm1);

 

However, when opening an item and just click "Save" button regardless editng or not editing , the email notification will be sent automatically.

For instance, IT team updates mobile#, then click the "Save" button, as we don't want to click "Completed" button if PC order has not completed. However when we click "Save" button,the Email nofitication will be triggered.

We want to set "Save"button not working for Email notification trigger by Automate.

Is there anyone faced the similar case and how did you solve?

 

Save button.jpgautomate trigger.jpg

6 REPLIES 6
SebS
Memorable Member
Memorable Member

@Glueck 

 

What is triggering Your Power Automate flow? I do not see any Run() command in Your Save button means You have some sort of "When new Item is created or modify" trigger right ?


If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.
Glueck
Frequent Visitor

@SebS  

 

Thank you for your comment😀

Yes, the below Automate triggers.

When clicking "Save" button, how can I do in order for "Save"  not to trigger automate?

This means, when clicking "Save",we don't want to send any Email notification automatically.

automate.jpgquestion.jpg

Rusk
Responsive Resident
Responsive Resident

As Power Automate is triggering the email, it would seem the change needs to occur with your Power Automate flow, not with your save formula.

 

Can you add something like a "Complete" column in SharePoint, and then add an "AND" to your flow?  If the item is modified AND the Complete value is true, then send the email

SebS
Memorable Member
Memorable Member

Hi @Glueck 

 

For things like that best trigger is PowerApps v2

 

SebS_0-1670575776669.png

 

 

Replace Your trigger with this one. Create the variable Yes as Text and add the condition what will be true if the variable will be set to Yes or You can use a boolean value and pass true false.

 

Add the flow to Your Power app from the menu on the Left

 

SebS_1-1670576081756.png

 

in the Save button, you will need to add a condition

 

 

IF(All 4 buttons are pressed,"FlowName".Run("Yes"))

 

 

I don't know how You set the buttons, so I can't write the whole code but hope this makes sense that way only if the condition will be meet the flow will be triggered.

 


If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.
Glueck
Frequent Visitor

@SebS  @Rusk 😊

 

Hello, thank you for your help!

I am sorry for my late reply as I just came back from the long vacation yesterday.

I will work on now based on your advice and will update again if solved or not.  Thank you

ChrisHam
New Member

Go to your list.
In the toolbar at the top of the list, click the Integrate button, choose Power Apps, and choose Customize forms.
In your new Power App, add two buttons, from the Insert menu.
Type the text on the two buttons: “Save” and “Save & New”

 

Regards,
Chris

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,643)