cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
charliekg
New Member

Autofill previously submitted data

 
17 REPLIES 17
Silvester
Skilled Sharer
Skilled Sharer

Then you need to reference each field in the ViewForm individually;
FullName: VarRecord.FullName
CitizenShip:VarRecord.CitizenShip.value, etc...
 This should work

 

@Silvester here is my code in the edit form. Set(varRecord, Self.LastSubmit);SubmitForm(EditForm1);Navigate(BadgeScreen)

Silvester
Skilled Sharer
Skilled Sharer

Right there, the code should be

SubmitForm(EditForm1);Set(varRecord, Self.LastSubmit);Navigate(BadgeScreen)

@Silvester Got it. now in the display form on the badge screen and the datacards that fills them. what and where do I need to put code

Silvester
Skilled Sharer
Skilled Sharer

You can reference every field by using
VarRecord.Fieldname

-Or better still if you have a form in the badge screen, set the form Item property to 
VarRecord  and that's all.


charliekg
New Member

@Silvester just getting " No item to display"

Silvester
Skilled Sharer
Skilled Sharer

Can you send me a screenshot of how your form look like? Can you confirm if the form is in View mode?

 

rubin_boer
Super User
Super User

hi @charliekg 

 

Please find the following:

As per @Drrickryp its a better practice to set the last record in the Form's OnSuccess Property. This way when you have an error which makes error handling easier when you get to that.

When you wish to see the data you submitted in the form again, which look like what you are seeking it, set the Item property of the form to you variable varRecord. 

 

When you submit the data the form set to a new form but with a record hence you will get "No item to display". That is because there is nothing to display, no item is connected.

 

Example without setting the item to varRecord

Peek 2022-06-28 20-10.gif

Now the same form but setting the Item = varRecord

 

Peek 2022-06-28 20-12.gif

 

Notice instead of the "no data to display" the data you just submitted stays, you may want to add this to OnSuccess  Notify("Your data has been submitted.",NotificationType.Success,3000)

rubin_boer_0-1656440085737.png

 

Hope this helps,

R

 

 

 

 

 

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,776)