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 / Form is not valid but ...
Power Apps
Answered

Form is not valid but can't trace the problem to a cause

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

My form can only be submitted if it's valid so the formula in the 'onselect' property of my submit button is:

 

 

If(!Form2_2.Valid && varFormMode_InApp=FormMode.New,DisplayMode.Disabled,DisplayMode.Edit)

 

 

The problem is this condition which shows that something on the form is not valid:

 

DanielRK_0-1634638174867.png

There are values in all fields but  I'm thinking that even though it looks like there are values perhaps they are not recognised as values by Powerapps.

 

Here is my form control:

 

DanielRK_1-1634638371413.png

 

DanielRK_2-1634638373413.png

 

It was working before but then I added the last two fields- Approver ((Person type column) and FlowType (Choice type column) in the datasource (SP list) and then in Powerapps.

 

 I set the defaultselecteditems and default properties in these cards such that they have pre-populated data conditional on the user submitting the form.

 

The correct approver appears in the approver field as does the flow type but the formulas I used were nested if statements and although I'm not getting an error, perhaps this is causing the value not to register as valid.

 

As a test, I tried outputing the data from each card in a label and the data shows successfully for each card except the attachments which I checked in a gallery and it does output data.

 

If anyone has advice on how to troubleshoot this issue I would greatly appreciate it.

 

Thank you!

 

Regards,

 

Daniel

Categories:
I have the same question (0)
  • RusselThomas Profile Picture
    4,014 on at

    Hi @Anonymous ,

    Just to check a couple of things - you mentioned your code for your button OnSelect property is 

    If(!Form2_2.Valid && varFormMode_InApp=FormMode.New,DisplayMode.Disabled,DisplayMode.Edit)

    however that code should be in the DisplayMode property shouldn't it?

    Assuming it's just a typo, then is it possible to submit the form and see which fields pops out an error on the form control?

    Kind regards,

    RT

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Anonymous 

     

    First way I can think of is since Valid of Form is aggregate of those of DataCard, go and output each DataCard.Valid value. Which one(s) is/are false are the ones causing the Form.Valid to be false as well. As for anything further, that would depend, but at least you can know which data cards it is which cause it.

     

    Other than this, maybe I can tell you a better way, but for now if you try the above tell me if it gives you any further idea.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @RusselThomas ,

     

    It is a typo indeed! Sorry for that.

     

    I did try and submit the form and I got this:

     

    DanielRK_0-1634642067379.png

     

    Thank you for you swift response.

     

    Regards,

     

    Daniel

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @poweractivate ,

     

    Thank you for your advice. How would you write the formula to check if a datacard's output is valid?

     

    I tried:

     

    DataCardValue21_1.valid

     

     

    But 'valid' doesn't seem to be an attribute that is valid like 'text' or 'selected.value'.

     

    Thank you again.

     

    Regards,

     

    Daniel 

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Anonymous 

     

    On the DataCard itself, not the DataCardValue or DataCardKey

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Excellent! I'm giving it a go now and will let you know. Thank you again!

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Anonymous 

     

    Example:

     

    poweractivate_0-1634642580086.png

     

    In above DataCardValue3_2 or DataCardKey3_2 does not have Valid

    Just Choices_DataCard1_2 has Valid property

     

    Check if it helps.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @poweractivate ,

     

    Thanks to your method, I found the problem card. It was one that was working fine before. The data type is a number and the formula for it's default property is:

     

    DanielRK_1-1634643625981.png

    DanielRK_0-1634643609383.png

     

    It outputs as 7 which is correct. I wrapped the lookup function in the value function as it was text before and now it's a number but it's still returning as not valid.

     

    Why is it not recognizing it as valid? Thank you again for all your time.

     

    Regards,

     

    Daniel 

  • Verified answer
    poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Anonymous 

     

    Is the DataCardValue corresponding to that Data Card for Region as follows for Default property: 

    Parent.Default

     

    or has it been changed to something else at some point?

     

    If changed, try putting Parent.Default for the DataCardValue corresponding to the Region Data Card and see if it works. So that the DataCardValue uses the Default value of the Data Card rather than some custom value.

     

    If it was not that, maybe I could also think of if it could be something else.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @poweractivate ,

     

    Through your method I found the problem.

     

    DanielRK_1-1634645437350.png

     

    I had set a maximum value in my datasource of 6 which changed after the fact as you said. I have now removed the limit.

     

    DanielRK_0-1634645432201.png

     

    Many thanks @poweractivate! I owe you one.

     

    Regards,

     

    Daniel

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard