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 / Powerapp Forms - Help ...
Power Apps
Answered

Powerapp Forms - Help with editing form and submitting for approval

(0) ShareShare
ReportReport
Posted on by

I have my Mobile app which is a form and my data source is from sql server.

 

I have a few questions:

Let me explain what Ia m doing first.

So first screen in the App has 2 buttons : 1. Create new work, 2. Edit new work. I am working on custom edit form for creating a new work order and when I click submit it should go to the manager for approval and also update in sql table. I tried writing my patch() which worked fine for a few fields I selected and submitted and i could see the data is stored in sql table.( FYI- this is what I did so far)

 

 

Now, 

 

1. I am not sure how to make this submit button work with flow in such a way that the manager can first approve and then the data should also be saved in the sql. Also once they submit I want the information to be cleared in the fields

 

2. To do editing to the already submitted form I created a new screen and inserted galary which has populated the forms I submitted for testing but I want to show only those forms that are belonged to that particular user.

 

3. When the user can see there forms and would like to edit something and resubmit it again I want my "Create form" (the first form) to be shown with all the information the user has submitted and also has the ability to add or remove anything they sbmitted already and resubmit for approval and add in database.

 

I have attached the pictures for better idea.

Can someone please help me with this.

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @asdeev,

    I have made a test on my side, please take a try with the following workaround:9.JPG

     

    10.JPG

     

    11.JPG

    For your first question, do you want to click the "Submit"  button to fire/trigger a flow to send the approval email? If you want to click the "Submit" button to fire/trigger a flow to send the approval email, you must create your flow firstly. The flow's configuration as below:12.JPG

    Then within your app, create a connection to above flow, then pass corresponding parameters to above flow from your app. Set the OnSelect property of the "Submit" button within your first form to following:

    'YourFlowName'.Run(DataCardValue27.Text, DataCardValue34.Text, ...);
    ResetForm(YourFirstForm)

    More details about starting a flow from an app, please check the following article:

    Start a flow from an app

     

    For your second question, if you only want show those forms that are belonged to the current login user, I think a Filter function could achieve your needs. I assume that you have create a column (e.g. SubmitterEmail) in your SQL TABLE to store the name or email address of the submitter, please set the Items property of the Gallery control to following formula:

    Filter('[dbo].[JHA_APP]', SubmitterEmail = User().Email) /* <-- SubmitterEmail represents a column in your SQL table to store the mail addredd of the submitter*/

    For your third question, if you want to display the selected item in your Gallery within the Edit form control (your first form), please take a try with the following formula:

    Set the OnSelect property of the Gallery control (Gallery1) to following:

    Navigate(AddScreen,ScreenTransition.Cover) /* <-- AddScreen represents the screen which contains your first form */

    Set the Item property of your first form ("Create form") to following:

    Gallery1.Selected

    Best regards,

    Kris

  • asdeev Profile Picture
    on at

    Hi Kris,

     

    Thanks so much for your help. I tried doing the same way you did for the approval flow. 

     

    So once the data is stored in SQL I want the person who submitted the form to get an email informaing about the approval. To do that do I just add another condition in the flow? (After Starting Approval- If yes - Send email informing approval, if no- send email informing rejection)? Or should I create a whole new flow for this?

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard