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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Submit Button w/ Multi...
Power Apps
Answered

Submit Button w/ Multiple functions

(0) ShareShare
ReportReport
Posted on by 35

I am in the process of creating an application that will NOT show the Submit button as "Active" unless the form has been properly filled out. I also am using the button to submit the inputted data to a SharePoint List.

I've used the following code:

Under DisplayMode:

 

 

If(And(IsEmpty('Form1-4_1'),!IsEmpty('Form1-4_1')),DisplayMode.Disabled, DisplayMode.Edit)

 

 

Then under OnSelect:

 

 

Patch(
 'the real Power Apps Tester',
 'the real Power Apps Tester';
 'Form1-1_1'.Updates,
 'Form1-3_1'.Updates,
 'Form1-4_1'.Updates,
 'Form1-5_1'.Updates
);

Clear(valPass);

ResetForm('Form1-1_1');
ResetForm('Form1-3_1');
ResetForm('Form1-4_1');
ResetForm('Form1-5_1');
NewForm('Form1-5_1');
Navigate(Screen1);

Notify(
 "Thank you for completing this form. We look forward to working with you!", NotificationType.Success, 4000);

 

 

Currently I cannot get it to function properly but it looks like the logic is there?

 

Current Error:
"Invalid argument type (Control). Expecting a Table value instead."

 

Thank you in advance for your help!

Categories:
  • Verified answer
    timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @thatonechick10 

    It's not possible to call IsEmpty against a form control. You would need to test the value of each input control in your form, so the formula would look more like this:

    If(Or(IsBlank(DatacardValue1.Text),IsBlank(DatacardValue2.Text))
     ,DisplayMode.Disabled, 
     DisplayMode.Edit
    )

     

    Also, if you're adding a new record, you would need to call the Defaults function in your call to Patch like so:

    Patch(
     'the real Power Apps Tester',
     Defaults('the real Power Apps Tester'),
     'Form1-1_1'.Updates,
     'Form1-3_1'.Updates,
     'Form1-4_1'.Updates,
     'Form1-5_1'.Updates
    );
  • thatonechick10 Profile Picture
    35 on at

    Okay, I have updated the code to the following:

    If(Or(IsBlank(DataCardValue20_1.Text),
     IsBlank(DataCardValue21_1.Text),
     IsBlank(DataCardValue26_1.Text),
     IsBlank(DataCardValue32_1.Text),
     ),DisplayMode.Disabled, DisplayMode.Edit)

     

    There are 4 required fields in the form that I am ensuring are filled out before the submit button is even available to click. 

    Current error with the above code: 

    "Invalid argument type (Error). Expecting a Boolean value instead."

  • thatonechick10 Profile Picture
    35 on at

    I found the issue. simple as a comma in the wrong place 😅

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard