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

Checkbox Required

(1) ShareShare
ReportReport
Posted on by 57

Hey, I have a button and I want it to only go to the next screen when the checkboxes are checked, so far I have this code, at the moment it gives a notify if the checkbox is not filled in, but if it is filled in , it still gives the notify and the checkbox becomes empty again: If(
!Checkbox1.Value;
Notify("Checkbox must be completed"));;
If(
!Checkbox1.Value = true;
Patch(
'Periodic maintenance';
GalleryMaintenance.Selected;
{
'Last maintenance performed': Now();
'Next maintenance': DateAdd(Now(); GalleryMaintenance.Selected.FrequencyinDays; TimeUnit.Days)
}
);
SubmitForm(FormJobMaintenance);
Navigate(Periodic maintenance job completed)
)

Categories:
  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @Coendw 

     

    please try the following:

    If(
     Checkbox1.Value,
    
     Patch(
     'Periodic maintenance',
     GalleryMaintenance.Selected,
     {
     'Last maintenance performed': Now(),
     'Next maintenance': DateAdd(Now(), GalleryMaintenance.Selected.FrequencyinDays, TimeUnit.Days)
     }
     ),
     SubmitForm(FormJobMaintenance),
     Navigate('Periodic maintenance job completed'),
     
     Notify("Checkbox must be completed")
    );
    

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • Coendw Profile Picture
    57 on at

    This doesn't work, it now continues automatically

     

  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @Coendw 

     

    thanks for trying. can you try this modyfication:

    If(
     Checkbox1.Value,
    
     (
     Patch(
     'Periodic maintenance',
     GalleryMaintenance.Selected,
     {
     'Last maintenance performed': Now(),
     'Next maintenance': DateAdd(Now(), GalleryMaintenance.Selected.FrequencyinDays, TimeUnit.Days)
     }
     ),
     SubmitForm(FormJobMaintenance),
     Navigate('Periodic maintenance job completed')
     ),
    
     Notify("Checkbox must be completed", NotificationType.Error)
    );
    

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • Coendw Profile Picture
    57 on at

    Now If has some invalid arguments

  • RobGas Profile Picture
    75 on at

    Replace the "," values before and after with "And" 

    And
     SubmitForm(FormJobMaintenance) And
     Navigate('Periodic maintenance job completed')

     

  • Coendw Profile Picture
    57 on at

    This doesnt work

  • RobGas Profile Picture
    75 on at

    Can you share the full code with the And replacments?

  • Coendw Profile Picture
    57 on at
    If(
        !Checkbox1.Value;
        Patch(
            'Periodiek onderhoud Zoomstede';
            GalleryZoomstede.Selected;
            {
                'Laatst uitgevoerde onderhoudsbeurt': Now();
                'Eerstvolgende onderhoudsbeurt': DateAdd(Now(); GalleryZoomstede.Selected.FrequentieinDagen; TimeUnit.Days)
            }
        );
        And
        SubmitForm(FormJobZoomstede) And
        Navigate(Periodiekonderhoudjobvoltooid);

        Notify("Checkbox must be completed")
    )
  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

     

     

    If(
     !Checkbox1.Value;
     Notify("Checkbox must be completed");
     Patch(
     'Periodiek onderhoud Zoomstede';
     GalleryZoomstede.Selected;
     {
     'Laatst uitgevoerde onderhoudsbeurt': Now();
     'Eerstvolgende onderhoudsbeurt': DateAdd(Now(); GalleryZoomstede.Selected.FrequentieinDagen; TimeUnit.Days)
     }
     );;
     SubmitForm(FormJobZoomstede)
    )

     

     

     

    Then on your Form's OnSuccess property have this:

     

     

    //assuming this is the name of the screen
    Navigate(Periodiekonderhoudjobvoltooid)

     

     

     

    This ensures that it only navigates if the form is submitted successfully

  • RobGas Profile Picture
    75 on at

    Try this:

     

    If(

        Checkbox1.Value;

        (Patch(

            'Periodiek onderhoud Zoomstede';

            GalleryZoomstede.Selected;

            {

                'Laatst uitgevoerde onderhoudsbeurt': Now();

                'Eerstvolgende onderhoudsbeurt': DateAdd(Now(); GalleryZoomstede.Selected.FrequentieinDagen; TimeUnit.Days)

            }

        )

        And

        SubmitForm(FormJobZoomstede) And

        Navigate(Periodiekonderhoudjobvoltooid));

     

        Notify("Checkbox must be completed")

    )

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 339 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 289

#3
Mohsin Ali Profile Picture

Mohsin Ali 228

Last 30 days Overall leaderboard