cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

Form Validation with custom card not working

@LukeW-MSFT

 

This is driving me nuts. Can anyone please advise me on what the issue is here and how to overcome it? 

 

  • Created an app from a Sharepoint custom list
  • Deleted the default label then pasted an existing label into the data card to keep styling consistent
  • Deleted the text input box and pasted in a dropdown menu to keep styling consistent
    • Dropdown Items property set to:
    • [" ", "Completed", "Completed w/ Comments", "Exceptions Taken"]
  • Set the data card Required property to true

If I leave the dropdown value set to "  ", then SubmitForm(), no Error Message appears and the form is successfully submitted. Text boxes within the form error-out correctly (see below), it just seems to be the dropdown. 

2018-06-15_7-28-18.png

 

I cannot for the life of me figure out why. 

2 REPLIES 2
Community Support Team
Community Support Team

Re: Form Validation with custom card not working

Hi @ericonline,

 

Could you please share a bit more about your app's configuration?

 

I have made a test on my side and don't have the issue that you mentioned. If I leave the Drop down (new pasted one) control empty, when I submit the form, the error message shows up as below:6.JPG

 

 

On your side, please check if the Update property of the DataCard control associated with the Drop down control (new pasted one) is set to following formula:

Dropdown1.Selected.Value

Note: The Dropdown1 represents the new pasted Drop down control on your side.

7.JPG

 

In addition, please also check if the Error Message Label is existed within the DataCard control (Associated with the Drop down control):8.JPG

If the Error Message Label is not existed within the DataCard control, please add a Label control within the DataCard and set the Text property of this Label control to following formula:

Parent.Error

 

Best regards,

Kris

 

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Super User
Super User

Re: Form Validation with custom card not working

I really appreciate your detailed follow up. Here are my results. Issue still present: 

 

  1. Dropdown Items Property set to: 
    1. [" ", "Completed", "Completed w/ Comments", "Exceptions Taken"]
       
    2. 0.png
  2. Error message is present with Text Property set to Parent.Error
    1. 1.png
  3. Data Card Update Property set to: (I need to report Comments if they are added)
    1. Concatenate(
          prejobSafetyChecklist_input.Selected.Value, 
          "; ", 
          If(
              IsBlank(
                  prejobSafetyChecklistComments_input.Text), "No comments", prejobSafetyChecklistComments_input.Text))
    2. 2.png
  4. Data Card Required Property set to True
    1. 3.png

Execute SubmitForm(formName) and no Error Message is displayed for the Data Cards in Question (there are 14 of them). The first 9 Data Cards error out just fine. But cards 10-24 do not error. 

 

Its almost like the " " option is being seen as a text value.  I've tried "" and Blank() as options as well. No Go.

4.png

 

If I slap a new version of the Data Card in and mark it Required, it errors out no problem. 

5.png

If I copy in the dropdown menu AND leave the Update property to dropdown_1.Selected.Value, everything errors out correctly. 

6.png

If I try to copy over the comment box and change the Update Function, NO GOOD, error message disappears.

 

What is wrong with my UPDATE Function where it overrides the REQUIRED Function of the Data Card?

7.png

 

Helpful resources

Announcements
thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,297)