web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Apps From - Butt...
Power Apps
Unanswered

Power Apps From - Button control

(0) ShareShare
ReportReport
Posted on by 10
Hi,
 
I have created a form with 3 button on Power Apps using the Sharepoint list. Need help to achieve the below.
 
3 buttons
SOP Request button
Completed button
Rejected button
 
SOP Request button greyed out before submission and activate when the required fields are filled, once the submitted the SOP Request button should be greyed out again.
 
Completed button and Rejected button but should not be visible and cannot be selected when submitting the form. The Completed button and Rejected button should be visible and can be selected to submit or clicked when the form is in edit mode on Sharepoint.
 
Status data card is a single line text
 
Categories:
I have the same question (0)
  • Suggested answer
    MMcCloud Profile Picture
    285 Super User 2025 Season 2 on at
    Power Apps From - Button control
    Good Afternoon,
     
    So correct me if I am wrong The Completed button and Rejected button should only be visible when you are in edit mode in SharePoint. : To achieve this we will need to be able to detect the different type of action in SharePoint.

    If things are default the SharePoint form should be called SharePointForm1 we need to look at the field that controls the mode ->
     
    DefaultMode it should say: FormMode.Edit or FormMode.New whichever in your case create the three necessary buttons then in the visible field do a formula similar to this:
     
    (Sorry the naming changed in the value)
    If(SharePointForm1.DisplayMode.Edit, true, false) // For those visible when editing and
    If(SharePointForm1.DisplayMode.New, true, false) // For those visible while create a new case
     
     
    Then for the part about SOP Request under the button you should have a DisplayMode Field again. Create an If Statement looking for not null in your fields in the form so the code will look like this:
     
    If(DataCardValue3.Text <> "", DisplayMode.Edit, DisplayMode.Edit)
     
    For multiples you will put a And then the next value that cannot be blank until the end then put the comma, True, False.
     
    That should help you get your buttons setup.
     
    If this solves your question please select this as the answer if you need more assistance feel free to comment I would be glad to help.
     
    Have a good day!
     
  • Verified answer
    MS.Ragavendar Profile Picture
    4,929 Super User 2025 Season 2 on at
    Power Apps From - Button control
     
    Screen → OnVisible ( One Variable)  -> Set(varSOPJustSubmitted, false)
     
     
    SOP Request button 
    Visible -> Property formName.Mode = FormMode.New
    DisplayMode
    If(
        varItemSubmitted,
        DisplayMode.Disabled,
        If(formName.Valid, DisplayMode.Edit, DisplayMode.Disabled)
    )
    OnSelect
    Set(varItemStatus, "SOP Requested");
    Set(varItemSubmitted, true);
     
     
    Completed & Rejected buttons
    Visible -> Property formName.Mode = FormMode.Edit
    OnSelect
    Set(varItemStatus, "Completed");
    Set(varItemStatus, "Rejected");
    SubmitForm(formName)
     
     
    Form submission  -> On Success (Property)
    Set(varItemStatus, Blank());
    Set(varItemSubmitted, false);
    ResetForm(formName);
     
    Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
     
  • SI-02051525-0 Profile Picture
    10 on at
    Power Apps From - Button control
     
    Thank you so much ! This is exactly I wanted really appreciate your help breaking down everything with the formula. 
     
    Worked like a charm!! Have a amazing weekend. Thank you!
  • SI-02051525-0 Profile Picture
    10 on at
    Power Apps From - Button control
     
    Thank you so much for the quick reply, I appreciate your help. I am new to forms and learning. 
     
    Have a great weekend!
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 819 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 308 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 222 Super User 2025 Season 2

Last 30 days Overall leaderboard