powerappspower-platform

MS PowerApp, Navigate and Patch dont work together (German)


My Problem is simple. The button that has the patch function to transfer the data to my sharepoint list has to also navigate to a success screen when pressed.

Patch alone works, but if i add the Navigate Code, the same error always appears.

Patch(
    Anfragenliste;
    Defaults(Anfragenliste);
    {
        Mitarbeiter: User().FullName;
        Gerät: drpGerät.Selected.Value;
        Ausleihdatum: dpAusleihdatum.SelectedDate;
        Rückgabedatum: dpRückgabedatum.SelectedDate;
        Status: "Genehmigung ausstehend"
    }
)*;*
Navigate(AntragVersendet; ScreenTransition.Fade)

The Semikolon before "Navigate" gets marked as an error. I dont know how to fix it, tried everything. I marked the Semikolon inbetween two stars so you know which one i mean.


Solution

  • In German, you need to use ;; to chain two different operations (one executing after the other), so this should work:

    Patch(
        Anfragenliste;
        Defaults(Anfragenliste);
        {
            Mitarbeiter: User().FullName;
            Gerät: drpGerät.Selected.Value;
            Ausleihdatum: dpAusleihdatum.SelectedDate;
            Rückgabedatum: dpRückgabedatum.SelectedDate;
            Status: "Genehmigung ausstehend"
        }
    );;
    Navigate(AntragVersendet; ScreenTransition.Fade)
    

    On locales that use , instead of . as the decimal separator, the "list separator" (what is used to separate arguments to functions or properties in a record) changes from , to ;, and the chaining operator changes from ; to ;;. See https://learn.microsoft.com/power-apps/maker/canvas-apps/global-apps#formula-separators-and-chaining-operator for more details.