Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

How to populate a form's choice from a previous form submission



I have 2 lists in Sharepoint: 

BasicInfo (ID, Name, CompanyName)

COVIDResponse (basicInfoID, Question1, Question2, Question(n+1) ..)


I have set COVIDResponse.basicInfoID to be a Lookup against BasicInfo, and set this as a required field.  On the sharepoint end of things, this works great - I must enter the data in BasicInfo first, then I am able to create a row in COVIDResponse - first selecting the correct basicInfo record before being able to create the COVIDResponse record.


I am trying to make a Powerapp for my users to use.  I've created the BasicInfo form without issue - data submits, etc.


On the next screen, I want to present the COVIDResponse fields.  Since I've made COVIDResponse.basicInfoID required, I need to know how to set it from the BasicInfo submission.


I have tried following, but she's pre-populating (and pre-selecting) a field in a select list.  This method didn't seem to work in my application.


I have tried using the Lookup() function (following loosely on by settings the Items value to "LookUp('Basic Visitor Information', ID=BasicVisitor_Form.LastSubmit.ID)", but this resulted in an error - Items is looking for a Table value, and lookup returns a single record.


Help? 🙂





Regular Visitor

Correct - 2 forms, on 2 different screens of the app.  1st form sets varLastSubmit onSuccess, and 2nd form is the one generating the error when I submit the form.


I added a custom datacard to the form, and set its datafield to "BasicVisitorID".


I added a TextField to that card, and set its default value to "varLastsubmit.ID". 


When I move from the 1st screen to the second screen, I see the generated ID in the textfield.  Upon submission of the 2nd screen of the app is where I am seeing the "BasicVisitorID: Field "BasicVisitorID" is required." error message.

Super User III
Super User III

I think you didn't get suggestion. Read my last message again. Delete the Datacard which is a dropdown and insert a new one, this time not a dropdown but with just a textfield. After deleting, it be as if you are now adding a new field to your form. 


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

Regular Visitor

I don't get a choice as to the field type when I add the field - I am adding a field from a data source, and it comes in predefined as complex.


I found a thread at describing the exact problem I am having, and applied the solution there.  Seems to work so far!


Thank you again for your help with this, and apologies for not being clear on the exact issue I was encountering.

View solution in original post

Helpful resources

PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,105)