I've created custom buttons at the bottom of my form, which is integrated with a SharePoint List. Everything is working fine other than when I double-click an existing entry. The form goes into view mode, which means I hide my "Submit" button and my "Close" button's X value changes so it's centered on the form. My close button's OnSelect value is always set to RequestHide(). When I click the close button, nothing happens. If I click "Edit All" at the top and the form goes into edit mode, it works fine (also works fine when creating a new entry). Is there something special I need to set for OnSelect when the form is in view mode?
BTW, I checked to be sure and my hidden Submit button does not cover or intersect with the Close button.
Thanks for your help. I guess, by design, buttons are inactive when the form is in view mode? Since I don't want the form to always open in edit mode, I ended up setting the Visible filed for my custom datacard to "!(SharePointForm1.Mode = FormMode.View)", so it just hides the buttons when in view mode. Kind of a good reminder that you're only viewing the form.
I think what you're saying is the more involved solution would be to put the entire form into edit mode by default, then use a variable to determine when the fields should be in view mode. I think that means I'd have to set code for each field's DisplayMode property so it uses the variable to determine its mode. That would work, but I'd have to remember to do that for any new fields as well. Thankfully, for this solution, hiding the buttons when viewing is acceptable.
I'm chalking this up to just one of the quirks of Power Apps!
Hi @UkimanPA - I tried it there with button and icon and see what you mean. It doesn't matter even if you change the displaymode of the controls and datacard to edit, it still respects the parent (screen) displaymode as view when the item is opened.
You have a couple of options:
1) Change the 'OnView' property of the SharePoint Integration object to be edit by default when someone opens an item (as shown below) - If you don't want everything going to edit, you could trigger a variable 'OnView' to ensure all but your button datacards remain in view until you switch the variable to true by selecting edit in the Sharepoint integration object. It's a bit of work, but if you wanted that view/edit function, whilst also keeping your button positioning that you already have in place, you could do something like that.
2) Leave the button outside your form, but make your canvas wider and wrap your fields to show up to 4 fields side by side so it all fits on one screen with no/minimal need to scroll and then you wouldn't loose the button.
Neither options may be perfect for your use case, but will hopefully be of some use.
Thanks for the suggestion. That did work, but the problem is if it's not in a datacard, then it doesn't scroll with the form... or is there a way to do that? I am confused why the card would cause an issue when the form is in view mode. It was just an empty custom card to contain the buttons.
@UkimanPA you mentioned it's in the same card?... try installing it on the screen and not inside a datacard
The visibility of the button is working fine, but I tried your suggestion anyway. Same result.
Try visible ,false, true, for button with "IF" condition
Thanks. I added a new button but that one's not working either. It's so strange. The new button is in the same card as the old one. I only customized two properties:
The button doesn't seem to even click and it certainly doesn't close the form. I feel like there's something with buttons or cards or form modes that I'm just not understanding. 🙄
@UkimanPA RequestHide() works in View Mode as well. Just to be sure, and another button and give it a try.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2