I'm trying to create an email trigger for my power app that has two forms. I want to create two separate "When an item is modified on SharePoint send a customized email" triggers when each of the forms is submitted. I tried using the trigger conditions to achieve this but that's not working. I added a customized data card on form 1 and created conditions to run the flow only when specific columns have changed. When I add this expression on the trigger conditions, any changes made on form 2 are still triggering an email.
Data card code set on Default for Form1: If(Form1.DisplayMode = DisplayMode.Edit && DataCardValue1.Text <> ThisItem.Title && DataCardValue3.Selected.Value<>ThisItem.Department.Value,"yes","no")
Trigger condition:
Is there a solution to rectify this?
Change the Flow trigger to be a manual Power Apps trigger and run the flow from the submit button on each of the forms. If you want to only have one flow make sure that the parameters being passed from each form when you run the flow are the same. You can't have two different trigger conditions on a trigger (or two different triggers) in a flow.
Can you explain please again the issue?
Do you need to trigger a flow from powerapps on a button click?
Hi @PoojithaP
I'll be honest and say I am not a PowerApps expert yet. So I would like to call in on @Mira_Ghaly and @Pstork1 who might be able to sort this one for you.
Good luck with your development.
Damien
Hi Damien,
Thank you for that suggestion. I did try adding a form column on Sharepoint and on change of that column I tried to create the flow using the triggers you mentioned. But when I keep switching from one form to another, the form number also changes and that messes up with the email triggers. For example, I have two gallery controls and when I click on edit form from gallery1, I edit Form 1 and submit,This is the landing page. Modify existing demand navigates to form 1(Demand Form) and update of Demands navigates to form 2(IT Form)
This is the gallery record from where I can edit details on form 1.
This is the data card in which the Demand or IT form is selected by the user and accordingly the email should trigger. and when I modify from gallery2, I edit Form 2, and then the form column changes form 2 to form1 automatically. I don't know why that happens.
Hi @PoojithaP
How are you getting on?
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien
P.S. take a look at my new blog here
Hi @PoojithaP
Assuming this is the same SharePoint list? Why not have a column that you use to identify the form.
Form trigger on flow 1:
@equals(triggerBody()?['Form'],'One')
Form trigger on flow 2:
@equals(triggerBody()?['Form'],'Two')
Set the Form Column on your list when it is created.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien
P.S. take a look at my new blog here
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional