I would like to disable the submit button on an app if in a connected sharepoint list, the author email is found and the active column is set to true.
Hi @pw212,
You could use the following code in the DisplayMode property of that button. You will have to adjust the list name & column names accordingly.
If(
IsBlank(
LookUp(
ListName,
//Should you have a text column use: TextColumn = User().Email
//Should Active column be text use: ActiveColumn = "true"
PersonColumn.Email = User().Email && ActiveColumn
)
),
DisplayMode.Edit,
DisplayMode.Disabled
)
If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.
Thanks!
To disable the submit button in your Power Apps canvas app based on specific conditions in a connected SharePoint list, you will need to follow these steps. This process involves fetching the SharePoint list item based on the author email and checking the value of the "active" column. Here's how you can accomplish this:
Here is a step-by-step guide:
Step 1: Add SharePoint List as Data Source
Step 2: Write the Formula for the Button's DisplayMode Property
If(
IsBlank(
LookUp(
AuthorsList,
AuthorEmail = User().Email && Active = true
)
),
DisplayMode.Edit,
DisplayMode.Disabled
)
Explanation:
By using this formula, the submit button will be disabled if there's an item in the "AuthorsList" where the "AuthorEmail" matches the current user's email and the "Active" column is set to true. Otherwise, the button will be enabled.
This approach assumes that the "AuthorEmail" and "Active" are the correct internal names of your columns in SharePoint. Ensure to replace them with the actual internal names of your columns. Also, this formula uses User().Email to get the current user's email, ensure this matches how your app is set up to identify users.
WarrenBelz
770
Most Valuable Professional
stampcoin
494
MS.Ragavendar
399