cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
macksmashben
Level: Powered On

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


@DE1 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?

IrhanC
Level: Powered On

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


 

EKJOAN
Level: Power Up

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.

RaynBow
Level: Powered On

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.

LukeC
Level: Powered On

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.

rgparisoto
Level: Powered On

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.


 

DavidHartung
Level: Powered On

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

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

PowerApps Staff ADobin
PowerApps Staff

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.

BartSchaap
Level: Powered On

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.

antoineg
Level: Powered On

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
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 72 members 4,156 guests
Please welcome our newest community members: