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 Apps
Answered

Required Fields

(0) ShareShare
ReportReport
Posted on by 228

On the OnSubmit property for my submit button I have the code shown below that isn't allowing the user to correct the required fields before moving to the success screen. Can someone please tell me what I'm missing?

 

If(IsBlank(DataCardValue18_1) || IsBlank(DataCardValue11) || IsBlank(Radio2_1) || IsBlank(Radio3_1) || IsBlank(DataCardValue62_3) || IsBlank(DataCardValue25) || IsBlank(DataCardValue114_1)|| IsBlank(DataCardValue175)|| IsBlank(DataCardValue171)|| IsBlank(DataCardValue169)|| IsBlank(DataCardValue72_1)|| IsBlank(DataCardValue118_1)|| IsBlank(DataCardValue119_1)|| IsBlank(DataCardValue174), Notify("Please check the General and Frontrunner Tabs for Required Fields.", NotificationType.Error), SubmitForm(NCAForm_2)); Navigate(SuccessNCA, ScreenTransition.Fade)

 

Thanks in advance! 🙂

Categories:
I have the same question (0)
  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi @ShondaT ,
    Try capturing values of controls instead of directly mentioning control name in the formula. I am not aware of control type of controls you have mentioned in the formula but you can use below formula for respective control types -
    1. If control is Input, use IsBlank(DataCardValue.Text).

    2. If control is dropdown you can use IsBlank(DataCardValue.Selected.Value)

    3. In case of Toggle use !DataCardValue.

    4. In case of Radio use IsBlank(RadioControlName.Selected.Value).

  • ShondaT Profile Picture
    228 on at

    The code works if I remove the "; Navigate(SuccessNCA, ScreenTransition.Fade)" so I'm not sure if it's a matter of those controls. 

  • SolTeferi Profile Picture
    on at

    Hi @ShondaT ,

    NandiniBhagya20 is correct on the data types and using the values, not the controls.

    But, the reason your submit button directs to the success screen even if there is error is because you put the Navigate function outside the IF function. Below is how the last part of your formula should look like, which places the Navigate function inside the IF function.

     

     ..... SubmitForm(NCAForm_2); Navigate(SuccessNCA, ScreenTransition.Fade) ); 

     

  • Verified answer
    mmollet Profile Picture
    3,187 on at

    I agree with what everyone above me said but I have one thing to add. I would take the Navigate part at the end off completely and paste it in the Form's OnSuccess property. This will make this code execute better as well as then that code will be where it should be for execution. This will also ensure it is only ran when the form is successfully submitted. 

  • ShondaT Profile Picture
    228 on at

    @mmollet @NandiniBhagya20 @SolTeferi 

     

    This is what I have now and I'm getting an error on the comma just before "Notify"

    If(IsBlank(DataCardValue49_1.Selected.DisplayName) ||(IsBlank(Radio2_1.Selected.Value) || IsBlank(Radio3_1.Selected.Value) || IsBlank(DataCardValue11.Text) || IsBlank(DataCardValue62_3.SelectedDate) || IsBlank(DataCardValue25.Selected.Value) || IsBlank(DataCardValue114_1.Selected.DisplayName) || IsBlank(DataCardValue175.Selected.Value)|| IsBlank(DataCardValue171.Selected.Value) || IsBlank(DataCardValue169.Selected.Value) || IsBlank(DataCardValue72_1.Text) || IsBlank(DataCardValue118_1.Text) || IsBlank(DataCardValue119_1.Text) || IsBlank(DataCardValue174.Selected.Value), Notify("Please check the General and Frontrunner Tabs for Required Fields.", NotificationType.Error), SubmitForm(NCAForm_2));

  • Verified answer
    NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi @ShondaT ,
    There is an extra "(" opening parenthesis before "(IsBlank(Radio2_1.Selected.Value)". Try using below formula - 

    If(IsBlank(DataCardValue49_1.Selected.DisplayName) || IsBlank(Radio2_1.Selected.Value) || IsBlank(Radio3_1.Selected.Value) || IsBlank(DataCardValue11.Text) || IsBlank(DataCardValue62_3.SelectedDate) || IsBlank(DataCardValue25.Selected.Value) || IsBlank(DataCardValue114_1.Selected.DisplayName) || IsBlank(DataCardValue175.Selected.Value) || IsBlank(DataCardValue171.Selected.Value) || IsBlank(DataCardValue169.Selected.Value) || IsBlank(DataCardValue72_1.Text) || IsBlank(DataCardValue118_1.Text) || IsBlank(DataCardValue119_1.Text) || IsBlank(DataCardValue174.Selected.Value), Notify("Please check the General and Frontrunner Tabs for Required Fields.", NotificationType.Error), SubmitForm(NCAForm_2); Navigate(SuccessNCA, ScreenTransition.Fade))

  • Verified answer
    ShondaT Profile Picture
    228 on at

    @NandiniBhagya20I should have seen that! It's working perfectly now! I also took @mmollet advisement to move the navigate code to the OnSuccess form property. Thanks so much to all of you!

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 431

#2
WarrenBelz Profile Picture

WarrenBelz 360 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 280 Super User 2026 Season 1

Last 30 days Overall leaderboard