cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Re: Bug: ViewForm() - ViewForm function can only work on an entity form.


@Anonymous wrote:

Bizarre, I've managed to do this as a temporary workaround:

 

frmForm.Mode = FormMode.View;
ResetForm(frmForm)

 

I use this exact same code in two separate places (on the same form). One instance of the code works fine, the other instance of the EXACT SAME code gives a Runtime error message:

 

"ResetForm function can only work on a form. Wrong kind of control is given as input to the function."


Yeah, I've had success changing the default mode to FormMode.View and then using ResetForm().

 

Not ideal at all.  Hopefully we'll get a hot fix?

Highlighted
Frequent Visitor

Re: Bug: ViewForm() - ViewForm function can only work on an entity form.

I have been having the same issue as well after debuging I thought the issue is something that MS has created via some update


@macksmashben wrote:

Hi there,

 

I suspect the most recent update to the experimental data tables may have broken ViewForm().  I'm getting the below error message now:

 

"ViewForm function can only work on an entity form.  Wrong kind of control is given as input to the function."

 

I've created a new blank app to test this (no experimental features on) and the same error message persists.  

 

> New Edit Form

> New Button

> Button onSelect = ViewForm(Newly created Edit Form)

 

Not too sure where bugs go in here so apologies if I've posted in the wrong area.

 

Thanks,

 

Ben


 

Highlighted
New Member

Re: Bug: ViewForm() - ViewForm function can only work on an entity form.

Experiencing the exact same problem.

 

Hope for a quick fix Microsoft, as it destroys my app.

Highlighted
Regular Visitor

Re: Bug: ViewForm() - ViewForm function can only work on an entity form.

I may have a temporary solution until Microsoft decides to do someting.

 

As you may know, ResetForm can change your form DisplayMode if his Defaultmode is set on ViewMode. However, I have noticed that ResetForm doesn't work with everything. For example, I wanted to change my form mode when I click on my Gallery and this doesn't work with ResetForm. 

 

So what I have done is simple, I put the ResetForm function on the onSelect function of a button which I set on Visible:false. After that, I just use OnSelect: Select(MyButton) to reset my form on my Gallery.

 

This worked for me and I hope it will for you while we wait MS.

Highlighted
Advocate IV
Advocate IV

Re: Bug: ViewForm() - ViewForm function can only work on an entity form.

I also have this bug on the app I've been most recently working on. It doesn't affect apps published more than perhaps a few days back (my other apps are unaffected).

 

It seems that the View mode may be altogether bugged, or that that is the root cause of ViewForm function not working.

 

Thanks in advance for priority on addressing this issue.

Highlighted
Helper V
Helper V

Re: Bug: ViewForm() - ViewForm function can only work on an entity form.

Same error at Brazil!


@LukeC wrote:

I also have this bug on the app I've been most recently working on. It doesn't affect apps published more than perhaps a few days back (my other apps are unaffected).

 

It seems that the View mode may be altogether bugged, or that that is the root cause of ViewForm function not working.

 

Thanks in advance for priority on addressing this issue.


 

Highlighted
Regular Visitor

Re: Bug: ViewForm() - ViewForm function can only work on an entity form.

Same error, alongside other unusual form behavior. Very confusing.

Highlighted
Power Apps
Power Apps

Re: Bug: ViewForm() - ViewForm function can only work on an entity form.

Thanks for all of the reports on this issue! We've released a fix and this should be resolved now.

View solution in original post

Highlighted
Advocate V
Advocate V

Re: Bug: ViewForm() - ViewForm function can only work on an entity form.

Tested today in the Netherlands; confirmed ViewForm works again. Thank you for fixing this, please don't make these errors again.

Highlighted
Anonymous
Not applicable

Re: Bug: ViewForm() - ViewForm function can only work on an entity form.

Thanks for fixing it, tested in France today and version .20 makes it works again !

 

Please, @ADobin could you add a way to choose which powerapps version we want to use in PowerApps studio ?

That way, if a problem like this happens again (I hope it wont), we can always chose to work with a previous version and don't lose time in our development.

 

Thanks in advance,

 

Helpful resources

Announcements
Check this Out

Announcing

Class of 2020- Season 2

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,832)