cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Navigate to a different page when done

Hello, 

I'm having an issue tying a navigate to a patch. What I'm doing, is I have a button, when clicking on it, it checks first if that user has already submit and answer , if they did it navigates him to a page if they haven't submit an answer yet, it goes and patches some things in a SharePoint list. What I want is after it patches to navigate to certain page. Everything I try it doesn't seems to like it. 

 

If(

    CountRows(

        Filter(

            mylist,

            'Created By'.Email = Office365Users.MyProfileV2().mail

        )

    ) > 0,

    Navigate(ScTryAgain),

    Patch(

        mylist,

        Defaults(mylist),

        {

            'number1': Value(Dropnumber1.SelectedText.Value),

            'number2': Value(Dropnumber2.SelectedText.Valuee),

            'number3': Value(Dropnumber3.SelectedText.Value),

            'number4': Value(Dropnumber4.SelectedText.Value),

            'number5': Value(Dropnumber5.SelectedText.Value),

            'number6': Value(Dropnumber6.SelectedText.Value),

            'number7': Value(Dropnumber7.SelectedText.Valuee),

            'number8': Value(Dropnumber8.SelectedText.Value),

            'number9': Value(Dropnumber9.SelectedText.Value)

        }

    )

);

 

Any help you can provide I would appreciate. Thank you in advance 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

@Thanasis 

Just realized that you wanted to navigate after the Patch.  I had assumed that your first navigate was not working.

In that case, just change your formula to the following:

If(
    CountRows(
        Filter(
            mylist,
            'Created By'.Email = Office365Users.MyProfileV2().mail
        )
    ) > 0,

    Navigate(ScTryAgain),

    Patch(
        mylist,
        Defaults(mylist),
        {
            'number1': Value(Dropnumber1.SelectedText.Value),
            'number2': Value(Dropnumber2.SelectedText.Valuee),
            'number3': Value(Dropnumber3.SelectedText.Value),
            'number4': Value(Dropnumber4.SelectedText.Value),
            'number5': Value(Dropnumber5.SelectedText.Value),
            'number6': Value(Dropnumber6.SelectedText.Value),
            'number7': Value(Dropnumber7.SelectedText.Valuee),
            'number8': Value(Dropnumber8.SelectedText.Value),
            'number9': Value(Dropnumber9.SelectedText.Value)
        }
    );
    Navigate(yourOtherScreen)
)

 

Notice we are just adding another function to the "Else" part of your If statement.  So, once the Patch is done, the next statement will execute.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

4 REPLIES 4
Highlighted
Super User III
Super User III

@Thanasis 

Your formula appears to be correct (except for two typos in the name Value in number2 and number7).

My question would be, do you actually get a match in your filter?

Put a label on your screen and set the Text property to the following:

CountRows(
    Filter(
        mylist,
        'Created By'.Email = Office365Users.MyProfileV2().mail
    )
)

See if you are actually getting items in your count.

 

I would focus on the email comparison.  Sometimes the case of the Email in SharePoint is different than the case from the 365 email - ex.  Name@domain.com <> name@domain.com

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Highlighted
Resident Rockstar
Resident Rockstar

Hi @Thanasis ,

You can Use Like below- 
Code that will Navigate you to another Screen once Patch Done. 

  CountRows(

        Filter(

            mylist,

            'Created By'.Email = Office365Users.MyProfileV2().mail

        )

    ) > 0,

    Navigate(ScTryAgain),

    Patch(

        mylist,

        Defaults(mylist),

        {

            'number1': Value(Dropnumber1.SelectedText.Value),

            'number2': Value(Dropnumber2.SelectedText.Valuee),

            'number3': Value(Dropnumber3.SelectedText.Value),

            'number4': Value(Dropnumber4.SelectedText.Value),

            'number5': Value(Dropnumber5.SelectedText.Value),

            'number6': Value(Dropnumber6.SelectedText.Value),

            'number7': Value(Dropnumber7.SelectedText.Valuee),

            'number8': Value(Dropnumber8.SelectedText.Value),

            'number9': Value(Dropnumber9.SelectedText.Value)

        }

    );UpdateContext({PatchDone:true});

);
If(PatchDone,Navigate(Screen61));

Thanks,
Vijay

Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."- Vijay



Highlighted

@Thanasis 

Just realized that you wanted to navigate after the Patch.  I had assumed that your first navigate was not working.

In that case, just change your formula to the following:

If(
    CountRows(
        Filter(
            mylist,
            'Created By'.Email = Office365Users.MyProfileV2().mail
        )
    ) > 0,

    Navigate(ScTryAgain),

    Patch(
        mylist,
        Defaults(mylist),
        {
            'number1': Value(Dropnumber1.SelectedText.Value),
            'number2': Value(Dropnumber2.SelectedText.Valuee),
            'number3': Value(Dropnumber3.SelectedText.Value),
            'number4': Value(Dropnumber4.SelectedText.Value),
            'number5': Value(Dropnumber5.SelectedText.Value),
            'number6': Value(Dropnumber6.SelectedText.Value),
            'number7': Value(Dropnumber7.SelectedText.Valuee),
            'number8': Value(Dropnumber8.SelectedText.Value),
            'number9': Value(Dropnumber9.SelectedText.Value)
        }
    );
    Navigate(yourOtherScreen)
)

 

Notice we are just adding another function to the "Else" part of your If statement.  So, once the Patch is done, the next statement will execute.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Highlighted

Hello @RandyHayes 

 

That worked perfectly. Thank you for your response.

 

@VijayTailor  Thank you for your response. 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,393)