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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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