Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

How do I check what is causing a form to be invalid or unsaved?

(1) ShareShare
ReportReport
Posted on by 825 Super User 2025 Season 1

I have two forms in my app and both seem to be having issues.

 

Form 1 is a simple edit form. The button to submit that form checks to see if the form is valid and if it is it toggles from disabled to edit using this code:

 

If(FRM_CampaignForm.Valid, DisplayMode.Edit,DisplayMode.Disabled)

 

For some reason, even though all the required fields are completed, the button does not go into edit mode. How do I find where/how the form is invalid?

 

Form 2. This form lives on a screen with a gallery. It is in view mode when entering the screen. There is an edit button that puts the form into edit mode. Along with this button I also have a submit button to submit any changes made to the form. That button is also disabled until a change happens with the form. My issue is that when I click the edit button the button is already in edit mode. How do I find what is triggering this? The code on the button is below.

 

If(
 FRM_CampaignReview.Unsaved,
 DisplayMode.Edit,
 DisplayMode.Disabled
)

 

 

 

 

Categories:
  • Verified answer
    futr_vision Profile Picture
    825 Super User 2025 Season 1 on at
    Re: How do I check what is causing a form to be invalid or unsaved?

    Finally figured out the solution to my form problem. I have a custom data card that has an HTML text box. In this box I am concatenating multiple values from various combo and text boxes. I wasn't seeing any errors pop but after making a few changes, which brought back the error messages, I noticed that this data card was throwing an error. The data in that HTML text box was exceeding 100 characters. The fix was to simply increase the number of characters the column in the table would allow. Always turns out to be something simple.

  • futr_vision Profile Picture
    825 Super User 2025 Season 1 on at
    Re: How do I check what is causing a form to be invalid or unsaved?

    Since I was able to figure out and answer the problem with the second form I am marking that one as the solution and opened a new post here regarding the first one which is very baffling.

     

    https://powerusers.microsoft.com/t5/Building-Power-Apps/How-do-I-find-what-is-causing-a-form-to-be-invalid/m-p/2606713#M644110

  • futr_vision Profile Picture
    825 Super User 2025 Season 1 on at
    Re: How do I check what is causing a form to be invalid or unsaved?

    Ok. One other discovery with the first form and the dependent combo box. The form validates only for one combination. None of the other combinations work. I've even added some additional combinations to the Dataverse table and it is still just the one combination that works.

  • Verified answer
    futr_vision Profile Picture
    825 Super User 2025 Season 1 on at
    Re: How do I check what is causing a form to be invalid or unsaved?

    The second form was definitely the formatting. I was taking the integer stored in the table and converting it to look like currency and then putting that in the field. Should have thought of that earlier.

     

    With the first form the problem seems to be a combo box that is dependent. I can't figure out exactly why. Some times when I make a selection the form is valid and other selections it is not. And sometimes, it will be valid and flip invalid.

  • futr_vision Profile Picture
    825 Super User 2025 Season 1 on at
    Re: How do I check what is causing a form to be invalid or unsaved?

    Yes. I've done that. I get a true/false response but that doesn't tell where in the form the problem is. I'm trying to figure out why the one form is considered invalid if all the required controls are populated and why the other form is appearing as being changed when all I did was switch from.......Hmmm. That second one I have an idea why. I added some formatting to the text entered into one of the text fields. I'll need to test to see if that is the case.

     

    The first one is still a bit of a mystery.

  • 365-Assist Profile Picture
    2,312 Super User 2025 Season 1 on at
    Re: How do I check what is causing a form to be invalid or unsaved?

    I would add a label on the Form and enter FRM_CampaignForm as the text. Then as you use the App you should be able to see the value change and check if the value is what you expect.

    ---------------------------------------------------
    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    Subscribe: https://www.youtube.com/channel/UCFpvUlpx84FuIPOdInGKMTw

    Regards
    Darren Lutchner - 365 Assist

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,651 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard