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 Apps
Unanswered

Leave Request form

(1) ShareShare
ReportReport
Posted on by 301

Hi there.  I'm hoping to get pointed to the right direction here. I'm building a custom Leave Request Form within Powerapps. Currently, we use a PDF form that we have to print out and hand to the Supervisor to approve.  I want to go electronic. The PDF has a table where you could select 5 different leave items.  (See attachment).  How would I build this table idea in Powerapps and also, how would I save the multiple information into a Sharepoint list?  My idea was to have a button or icon the add another request entry if needed. (instead of having 5 showing all the time). Also, one of the boxes is a drop down with types of leave.   I tried to google but I can't find the correct wording to get an answer.    Any ideas?  

leaveRequest.JPG PDF that we currently use. 

Thank you very much!

Categories:
I have the same question (0)
  • MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hey @Timm1 

    you can use a SharePoint List with just the same columns, that you have in your form and for each item in your table, you create a new item in your SharePoint list. If you want to combine these to a request, you can work with two lists, one for the form itself (like basic information who, to whom, when, totals etc. about the request) and a details list with the Item ID from the other list (lookup or just plain text/value column) and the other information like requested leave, start date, end date, days, hours.

    In your app, you can use a Gallery, this Gallery is connected to an Power Apps Collection. To create a new collection, you can use (on app start):

    ClearCollect(colLocalList,{Leave:"",StartDate:""...})

    This collection is connected to your Gallery. Within your gallery you have your fields, that are edible like dropdown, date etc. On the "OnChange" properties of your actions in your gallery, you need to add an Update() function like:

    //Update the value "Leave" for the current item
    Update(colLocalList,ThisItem,{Leave:Self.SelectedText.Value})

    You need another button to add more items to your collection using Collect() function:

    Collect(colLocalList, {})

    The last button will patch everything to your SharePoint list(s) using the patch() fuction:

    Patch function in Power Apps - Power Apps | Microsoft Docs

     

    Hope this gives you an idea on how to achieve this.

     

    Best regards
    Marvin

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

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Timm1 Try editable grid control enabled on a Table in model-driven app - see if it helps you.

     

    https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/make-grids-lists-editable-custom-control

     

    I think above is the easiest.

     

    If you do not like Model Driven App and Dataverse and prefer using Canvas App + SharePoint only for example,  then you can also achieve this functionality in a Canvas App by having a Form and have a field corresponding to each column in your draft. The following is just very rough idea and you would need to check it further. You can have the controls copied and pasted 5 times and arranged in the manner you like. You can then have SubmitForm and OnSuccess it can iterate through the others and Patch those as new records too only in the condition that it was not blank on that row. If you want not to show all 5 rows even to begin with you can by default hide them and show just 1, have a (+) button and then when it is pressed it un-hides each  next row based on how many rows have been un-hidden so far.

     

    The above is very rough and there is more to  it, the rest you can try to check it yourself and see if it works for you or you can try to await a reply with more specific idea from someone else for Canvas App.

     

    Check if above helps @Timm1 

  • Timm1 Profile Picture
    301 on at

    Thank you for your suggestion.  Seems that our Microsoft plan does not cover Model Driven Apps.  I like the idea of hiding the other rows and have a (+) button.  Thank you! 

  • Timm1 Profile Picture
    301 on at

    Thank you very much.    I like the creating the 2 lists in Sharepoint. I have seen a video on how to do that.  I will look into that option. 

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard