0
votes

In my app I am using this code

If(Checkbox1.Value; Remove(IdeaBox_1; ThisItem); Notify("Click checkbox to delete"; NotificationType.Error))

It checks whethere the Chckbox is ticket. If it is it allows to delete items from Sharepoint list, if it isn't if shows error.

I wanted to change this function so after deletion it will Navigate to another screen but I am unsuccesful.

None of this functions work correctly as they are navigating to next Screen even if Checkbox is unchecked (error message).

If(Checkbox1.Value; Remove(IdeaBox_1; ThisItem) && Navigate(Screen10;Fade); Notify("Click checkbox to delete"; NotificationType.Error))
If(Checkbox1.Value; Remove(IdeaBox_1; ThisItem); Notify("Click checkbox to delete"; NotificationType.Error);Navigate(Screen10;Fade))
If(Checkbox1.Value; Remove(IdeaBox_1; ThisItem); Navigate(Screen10;Fade)); Notify("Click checkbox to delete"; NotificationType.Error)
If(Checkbox1.Value; Navigate(Screen10);Remove(IdeaBox_1; ThisItem); Notify("Click checkbox to delete"; NotificationType.Error))
If(Checkbox1.Value;Remove(IdeaBox_1;LookUp(IdeaBox_1; ID= ThisItem.ID));
Notify("Click checkbox to delete"; NotificationType.Error);Navigate(Screen10;Fade))
If(Checkbox1.Value; Remove(IdeaBox_1; ThisItem); Notify("Click checkbox to delete"; NotificationType.Error); Navigate (Screen10))
2

2 Answers

0
votes

You can use the chaining operator to navigate after the removal, which in your language will be ;;:

If(
    Checkbox1.Value;
    Remove(IdeaBox_1; ThisItem);; Navigate(Screen10; Fade);
    Notify("Click checkbox to delete"; NotificationType.Error))

You can check out the list of operators, and the page that talks about how they can change depending on the language.

0
votes

Checkbox has property called OnCheck and OnUncheck . Try using that.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-check-box