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.

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.

Helpful resources

Ignite 2022


Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,122)