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

Navigate to a Screen by DataCardValue

Hi Community,

 

I'm an absolut Powerapps Rookie and I can't find a solution to this issue...

 

I want to navigate to a specific screen based on the DataCardValue1 in this case.

 

Sure found out that this doesn't work: Navigate('DataCardValue1.Selected.Value'; ScreenTransition.None)

 

Screenshot 2022-01-26 154752.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Maciboi 

If your problem has been solved, you could go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

Thank you for your cooperation!

Best Regards.

View solution in original post

4 REPLIES 4
RandyHayes
Super User
Super User

@Maciboi 

You cannot provide a PowreApp control name or any schema (fields/columns) by reference like that.  They must be specified.

 

1) You can either include your screens in your DataCardValue1 items control and reference that.

Ex.  

Items: Table({Value:"123", Scrn: someScreenName}, {Value:"234", Scrn: someOtherScreenName})

Then on the OnSelect action of the button:

    Navigate(DataCardValue1.Selected.Scrn)

 

2) Utilize a Switch statement.

Ex.

Navigate(
    Switch(DataCardValue1.Selected.Value,
        "123", someScreenName,
        "234", someOtherScreenName
        someDefaultScreen
    )
)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes thanks a lot for replying this fast.

 

1) Where do I include this? 
Items: Table({Value:"123", Scrn: someScreenName}, {Value:"234", Scrn: someOtherScreenName})

Where is the item controls? Is it this?

Maciboi_0-1643279416890.png

 

2) I understand the switch function, but I tried this but it gives me an error 

Maciboi_1-1643279500476.png

Also I tried this:

Maciboi_2-1643280046843.png

 

It always say names are invalid 

 

Maciboi
Frequent Visitor

Ok I was able to make it work with IF! 

Maciboi_0-1643281512443.png

Tried the same with Switch:

Maciboi_1-1643281610739.png

In the end I can live with the IF solution 🙂 

 

 

Hi @Maciboi 

If your problem has been solved, you could go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

Thank you for your cooperation!

Best Regards.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,605)