cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FernandB
Helper II
Helper II

ResetForm not working in datacardvalue with a variable as the default.

Hello,

 

The OnSelect of a button in my app Set(varM1P,varM1P+1) to count in a DatacardValue. The Default is varM1P. The forms do not reset at all after a submit.

 

 

FernandB_0-1618355536050.png

FernandB_1-1618355586498.png

 

OnSelect of Submit:


Set(
ChoiceVar,
{Value: "Open"}
);
Patch(
'Hand Hygiene Audit App',
varRecord,
Form1.Updates,
Form2.Updates,
Form3.Updates
);
ResetForm(Form1);
ResetForm(Form2);
ResetForm(Form3);
Navigate(
ScreenStart,
ScreenTransition.Fade
)

 

14 REPLIES 14

Hi Warren,

Yes. The variable resets now but when I go into the gallery to open the item it clears the data because the variable is still active. I have the same issue using UpdateContext.

Hi @FernandB ,

You seem to have a circular issue with your form and the variable - your original post was about resetting and seems to be solved. I cannot see your form, but have a look at the content and how it relates to the Variable.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

FernandB
Helper II
Helper II

I used UpdateContext to update the variable for the OnVisible of the screen and this seems to have been the issue.
If(
varMode = "Edit",
UpdateContext(
{
varM1P: Value(varRecord.'Moment 1 Before patient or environment contact (Completed)'),

 

Thank you 

@FernandB ,

So this is not solved?

FernandB
Helper II
Helper II

Yes, after the initial issue of resetting the variable was resolved another issue came up where I couldn't save the records values.

Helpful resources

Announcements
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.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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