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

How to pre-populate a drop down box on a form with user's last entry

Hi,

 

I have been looking tirelessly to find out how to do this with numerous of other "solved" questions which all fail to work or state non-existent formulas.

 

We have a basic SharePoint list linked to a power app as a front end form, we want to be able to pre-populate a choice dropdown field on the new entry form with that user's last entry for that field. We have multiple users submitting data at the same time so cannot just be the last entry in the list unfortunately)

 

The reason for this is they are recording numbers onto different ferry boats and continuously have to generate forms for one landing point at a time but then have to move to the next landing when sea levels move during the day (due to the tides) and then continually have to enter the same landing name from the list when at the landing. So are trying to stream line it so unless they change it, it will default to their last landing field entry.

 

We do not have any specific columns for submitting user details saved when submitting the form but the SharePoint list has a 'Created By' column which auto populates with which ever office 365 user has created that entry?

 

Any help would be greatly appreciated

1 REPLY 1
jbrit2020
Continued Contributor
Continued Contributor

Here's what you do:

  1.  On the "On Success" property of your form you put the following: ClearCollect( LastSubmits, { AnyNewColumnName: Form1.LastSubmit.SharepointColumnName} )  this will create a collection with the last submitted value of the dropdown box you want memorized
  2. On the dropdown box that you want pre-populated you put the following under the "Default" property: LookUp(LastSubmits,!IsBlank(AnyNewColumnName),AnyNewColumnName)

this should do the trick.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,431)