web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Prepopulate a text inp...
Power Apps
Unanswered

Prepopulate a text input field with previous users entries from SharePoint

(0) ShareShare
ReportReport
Posted on by 186

Hello. I am creating a reporting app on Power apps. The app has a form that has among many inputs two fields with the following labels.
1. This_weeks_outcome - (Used to enter what should be done for the current week).
2. Next_weeks_plans - (Used to document what plans we have for the following week). 
aaapsaqqq.PNG






 

 

 

 

 

 

 

So the plan is that for every week, populate Next_weeks_plans field on power apps that I entered last week and putting it into This_weeks_outcome field. I also want the prepolulated text editable incase anything changes during the course of the week. 
This items are all in one SharePoint list. 
In picture format it is as follows 
Last week manual entry before submit(of course with other items too)Capturewert.PNG

 

This weeks reporting before submission of other entries

asaasasas.PNG

 

Categories:
  • BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi @Rick_black ,

     

    Assuming you are using a from, what you can do is to include some code in the control that submits the form to check if a record already exists for the next week:

     

    If it does, update the "This week's outcome" column with the value of the "Plan for next week" field.

    If it doesn't, create a new item and populate all required fields.

  • Rick_black Profile Picture
    186 on at

    Hello @BCBuizer I am quite new to the Power apps. How would that code sort of look like. Yes I am using a form. 

  • BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi @Rick_black ,

     

    The code would look some thing like the below:

     

    First you save the item for the next week, based on the user and startdate in a variable. Then you check if the variable is empty and if it is, you create a new item in the datasource. If the variable is not empty, item in the datasource is update.

     

    Set(
    	varNextWeek,
    	Filter(
    		SharePoint,
    		User.Email = User().Email && WeekStartDate = DateAdd(DataCardValue***, 7)
    	)
    );
    
    If(
    	IsEmpty(varNextWeek),
    	Patch(SharePoint, Defaults(SharePoint),{
    		User : User(),
    		WeekstartDate : DateAdd(DataCardValue***, 7),
    		"This week's outcome : DataCardValue***, 
    		etc.
    	}),
    	Patch(Sharepoint, varNextWeek,{
    		"This week's outcome : DataCardValue***
    	})
    )

     

    DataCardValue*** refers to the DataCards in you form.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard