cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

Default edit form based on previous submission

I have a form and then another button to edit the form. The edit form button takes the user to a gallery populated only by their form submission. When they click the record I want the dropdowns to be defaulted to what they chose when they submitted the form. This is what I have so far for the datacard default LookUp(Freeform, 'User Retest' = varRecord.ID). The form has an item called varRecord, how can I use varRecord or the ID column to acheive this. I want to put the user retest dropdown response to be populated in the edit form. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

@powerapps890 

What I have gathered:

1) Your underlying column is a Text column

2) Your Items on the ComboBox are set to  ["CS", "In-Vitro", "In-Vivo"]

 

You should then have the following set:

1) Your DataCard Default property should be : ThisItem.yourColumnName (replace yourColumnName with the name of your column)

2) Your ComboBox DefaultSelectedItems property should be set to: {Value: Parent.Default}

3) Your DataCard Update property should be set to: yourComboboxName.Selected.Value (replace with combobox name)

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

14 REPLIES 14
Highlighted
Super User III
Super User III

@powerapps890 

Are you stating that the EditForm does not have the values in the DropDowns that were submitted?

If so, then you need to look at all the Defaults.  First the Default on the DataCard containing your DropDowns, then on the Default of the Dropdown.  

They must all refer back to the record or else there will not be the information you want.

 

If you have specific formulas you are having problems with, then feel free to post them.  No variables are needed for this to work properly.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Highlighted

So what would the datacard value default be ? I have the combobox in the datacard the default right now is combobo.selected.value @RandyHayes 

Highlighted

@powerapps890 

Consider the Default of a DataCard to be the "Input" of your datacard.  That is *normally* the field value as determined by ThisItem.fieldName

Your controls then in the data card can refer to the Parent.Default value - which will be the field value as defined above.

 

Your Update property of the datacard is the "Output" of the datacard - this is what SubmitForm looks at exclusively in order to write data to the datasource.  It is *normally* the value of the Control in the datacard that contains the value.  IN your case, the Selected.Value of the combobox.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Highlighted

Right so I need to make the default of my combobox something, but what do I make it? @RandyHayes 

Highlighted

@powerapps890 

If it is a ComboBox, then you would be concerned with setting the DefaultSelectedItems property of the ComboBox.  And it *normally* would be set to Parent.Default

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Highlighted

Parent.Default gives an error... I have the combobox within the datacard and then I have the datacardvalue invisible , so it's just the combobox. @RandyHayes 

Highlighted

@powerapps890 

What is the error?

Most likely your underlying column for the datacard is not the correct type.  

What type of column is the field for the datacard?

 

Also, you never answered this question:

"Are you stating that the EditForm does not have the values in the DropDowns that were submitted?"

Trying still to determine if you are trying to display the value that was written to the datasource or something else.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Highlighted

No, there will only be one value submitted my form and edit form are the same form, there are just two different buttons where one is a blank form and then one takes you to a gallery of your submissions first and then you choose a form you submitted from there. My combobox's items are set to ["CS", "In-Vitro", "In-Vivo"]. When they go into the item from the gallery the attachment and comment are displayed but now the two values they submitted from the dropdown, so yes I want the dropdown to have their answers from the datasource. The error is "expected table value". @RandyHayes 

Highlighted

@powerapps890 

Thanks for clarifying.

For the error - Exactly - it will want a table value.  Thus my question - what type of column is the field for the datacard?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,940)