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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group


Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Top Solution Authors
Top Kudoed Authors
Users online (2,371)