Posts

Showing posts from March, 2025

🔵 Solution 1: Power Apps + SharePoint List (Direct Lookup)

🔵 Solution 1: Power Apps + SharePoint List (Direct Lookup) 🟩 Step 1: Create a SharePoint List List Name: UserRoles Columns: Email (Single line of text) Role (Choice or Single line of text: Owner, Member, Viewer) 🔸 Example Data: Email Role admin@yourdomain.com Owner user1@yourdomain.com Member viewer@yourdomain.com Viewer 🟠 Step 2: Connect SharePoint to Power Apps In Power Apps , go to the Data tab. Click + Add data → Choose SharePoint . Connect to your site and select the UserRoles list. 🟣 Step 3: Corrected App OnStart Code Here’s the fixed and optimized OnStart code: // Get the current user's email Set(CurrentUserEmail, Lower(User().Email)); // Retrieve the user’s role from the SharePoint list ClearCollect( UserRoleCollection, Filter( UserRoles, Lower(Email) = CurrentUserEmail ) ); // Check if a role was found and set flags If( CountRows(UserRoleCollection) > 0, Set(UserRole, First(Us...

Quickly Set Power Apps Forms to Read-Only Mode

  Quickly Set Power Apps Forms to Read-Only Mode Ensuring your entire Power Apps application is in read-only mode is easy and essential for scenarios where you want users to view data without making edits. Follow these straightforward methods to set every screen and form in your app to View Mode rapidly. ✅ Quickest Method: Form-Level View Mode Step 1: Set Each Form to View Mode Select each Form on every screen. Adjust the following property: DefaultMode = FormMode.View This ensures the form displays data in a non-editable format. Step 2: Ensure Data Cards Match Form Mode (Recommended) Select all Data Cards within each form. Set their property to: DisplayMode = Parent.DisplayMode This dynamically links Data Cards to the form’s mode, making maintenance easy. ✅ Advanced Method: Global Variable (Efficient for Large Apps) If your app has many screens and forms, consider using a global variable for efficiency: Step 1: Create a Global Variable on App Start Set thi...