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

Is it a Bug?

I have an edit form and cannot get any onselect function to work on any controls, if the control is inside a datacard, unless the form is in edit mode (which is not practical, as I need people to select a button when viewing the form). To me this must be a bug, as a view form (which is permanently in view mode) can use onselect absolutely fine.

 

The way I am going, I'm going to have to have a separate form to view and another to edit, which is a pain as it would be far easier to have one form that can do both. (I can't place a button over the top either as I have a scrolling form), surely this needs fixing?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Is it a Bug?

@Coatsy35 

Yes, you do have that issue with an EditForm.  Bug? not sure, but it definitely does behave that way.

 

One thing you can do is to "override" the form mode with your own mode. 

You could have your own variable somthing like formModeEdit set with UpdateContext({formModeEdit:true})  for when you want to be in edit mode and false when you don't.  Then, it's painful for a large form, but the idea is to unlock each datacard and then change the DisplayMode property of each DataCardValue control to If(formModeEdit, FormMode.Edit, FormMode.View).

Then keep your EditForm in Edit mode all the time and use the variable to change the displaymode of all the controls. 

Your button would be active all the time then.

I hope this provides to be a helpful workaround 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.

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

Re: Is it a Bug?

@Coatsy35 

Yes, you do have that issue with an EditForm.  Bug? not sure, but it definitely does behave that way.

 

One thing you can do is to "override" the form mode with your own mode. 

You could have your own variable somthing like formModeEdit set with UpdateContext({formModeEdit:true})  for when you want to be in edit mode and false when you don't.  Then, it's painful for a large form, but the idea is to unlock each datacard and then change the DisplayMode property of each DataCardValue control to If(formModeEdit, FormMode.Edit, FormMode.View).

Then keep your EditForm in Edit mode all the time and use the variable to change the displaymode of all the controls. 

Your button would be active all the time then.

I hope this provides to be a helpful workaround 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.

View solution in original post

Highlighted
Helper II
Helper II

Re: Is it a Bug?

@RandyHayes  Thatsa neat workaorund, thanks for that, never though to look at it like that. I will use that for now. it's a shame that they don't alter/fix it so we don't have to use such work arounds.

Highlighted
Community Support
Community Support

Re: Is it a Bug?

HI @Coatsy35 ,

Do you add a Button control within a Data card control in your Edit form?

 

Based on the issue that you mentioned, I think you have some misunderstanding on the "overrides" of DefaultMode property of Edit form.

 

When you add a Button control within a data card of your Edit form control, the DisplayMode property of the Edit form (Parent) would override that of the Button control in the data card (Child) within the Edit form.

In other words, the Button control in the data card of your Edit form which is in View mode would not be clickable for you.

The user @El-Shonka has faced similar issue with you, please check the following thread for more details:

https://powerusers.microsoft.com/t5/Creating-Apps/Adding-button-to-custom-card/m-p/244638?author_id=...

 

As an fixed solution, please consider take a try to add your button outside the Edit form (within the Edit screen) rather than within the data card of Edit form.

Note: If you add your button within Data card control of a Display form, the button control would also not be clickable.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper II
Helper II

Re: Is it a Bug?

I am actually wanting to click on a image rather than a button, but I used the button as an example. However, on a Display form you can click on an image or button. You suggested this was not possible but it is.

 

I cannot have the control outside of the form as then it would not scroll with the form. I will try as others have suggested and just turn on edit mode and turn of the cards I don't want editable and switch when needed.

Helpful resources

Announcements
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

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,568)