I've been working on implementing some applications using PowerApps. I come from a SharePoint/InfoPath background and am still heavily involved with SharePoint, so that's where most of my focus will be with regards to PowerApps. With that said, I have a few questions:
1. When clicking on a list item, the form launches. Is it possible to hide the "Edit All," "Save," etc. buttons in the little white ribbon at the top of the form? The last I read, it was not yet possible but that post was a few months old and was wondering if it is yet possible or at least on the roadmap. I want to control all edits/saves for the form.
2. From my reading, I thought the list form was designed to behave as follows when selecting the following options from the list:
- Clicking NEW launches the form in FormMode.New
- Clicking the list item launches the form in FormMode.View
- Editing the item via the "Edit" context menu selection launches the form in FormMode.Edit.
Based on that theory, I implemented the following formula on the screen on OnStart and then set a label equal to varStatus to see the result:
If(ListForm.Mode = FormMode.New, Set(varStatus,"New"));If(ListForm.Mode = FormMode.Edit, Set(varStatus,"Edit"));If(ListForm.Mode = FormMode.View, Set(varStatus,"View"))
Is my understanding correct? The reason I ask is that if I occasionally see some weird results. For example, if I sit in the list view and click NEW, it will show NEW as the FormMode. However, if I close the form, refresh, click NEW, and keep repeating the procedure, it will sometimes show EDIT and I haven't been able to narrow down why it does this sometimes. Any thoughts? I am using the FormMode to set initial status values and other things, so I really need it to work. 🙂
3. What's the recommended best practice for hiding "sections" of a form? For example, let's say a form has an employee section and a manager section. I've got a flow which determines a user's SharePoint group membership, sets variables in the PowerApp, and can hide individual controls by putting that variable in the Visible field for the control. But that seems like a lot of extra work whereas in InfoPath, I could just hide an enter section. Is there anything equivalent in PowerApps? I did try adding a second form to the screen as a "section", but it points to the same data source and that can cause issues with submission if both forms are to be submitted at once in some cases. For example, if the manager has to edit the employee section and then complete his/her section too - I could do it with a submit button for each section, but that seems clumsy. I did try using a single submit button with PATCH and submitting both forms that way and while it did work, it created a duplicate list entry and I haven't had time to sit down to figure it out.
4. EDIT: I thought of one more question. I have a flow which runs when a screen is launched and this flow checks SharePoint group membership and sets variables within PowerApps. Is it possible to run this flow when the *app* launches, or can I only run it on a screen launch? The reason I ask is that I don't want to have to run it on each screen to set the variables (the form may open on any screen depending on status). I suppose what I could do is make a dummy screen the first screen in the app and it would run the Flow, set the variables, and then navigate to the other screens based on form values and permissions.
Thanks, and I appreciate everyone's patience with my questions.

Report
All responses (
Answers (