cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anonymia25
Helper IV
Helper IV

Navigate to other screen from pie chart

There is three tabs with the following code implement in the buttons:

 

Set(showPending, true);Set(showApproved, false);Set(showRejected, false);

 


here a pie chart on select property to navigate to the screen..

 

Navigate(SubmitterListing,ScreenTransition.Cover);

 

 
I am trying to add navigation to a pie chart where each slices will navigate to different tabs in the same screen. Would that be possible? Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
rsaikrishna
Super User
Super User

@anonymia25 

 

For tab control, you may not need 3 different variables. You can use one variable. It helps to manage easily.

 

When clicking on Pending tab, use Set(varTab,"Pending")

When clicking on Approved tab, use Set(varTab,"Approved")

When clicking on Rejected tab, use Set(varTab,"Rejected")

 

On control's visibility rules, you can mention the following formula:

varTab = "Pending"  // This formula will show the control only when varTab variable value is set to Pending.

 

On clicking on the slice in the Pie Chart, you can write the following formuala:

 

Switch(PieChart1.Selected.Label,
"Pending",Set(varTab,"Pending"),
"Approved",Set(varTab,"Approved"),
"Rejected",Set(varTab,"Rejected"));

Navigate(TabScreen,Fade)

 

I hope this will be useful.

 

Please give a try and post here if you have any more questions.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

3 REPLIES 3
rsaikrishna
Super User
Super User

@anonymia25 

 

For tab control, you may not need 3 different variables. You can use one variable. It helps to manage easily.

 

When clicking on Pending tab, use Set(varTab,"Pending")

When clicking on Approved tab, use Set(varTab,"Approved")

When clicking on Rejected tab, use Set(varTab,"Rejected")

 

On control's visibility rules, you can mention the following formula:

varTab = "Pending"  // This formula will show the control only when varTab variable value is set to Pending.

 

On clicking on the slice in the Pie Chart, you can write the following formuala:

 

Switch(PieChart1.Selected.Label,
"Pending",Set(varTab,"Pending"),
"Approved",Set(varTab,"Approved"),
"Rejected",Set(varTab,"Rejected"));

Navigate(TabScreen,Fade)

 

I hope this will be useful.

 

Please give a try and post here if you have any more questions.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

thank you so much, Krishna! That really solved my problem.
But after replacing the variable for the tabs, my refresh screen does not work, in which i want the tabs to be unselected whenever the user navigates away from the screen..

@anonymia25 

 

When you are navigating away from the screen or onvisible property of the screen, you can set the variable to Set(varTab,Blank())

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,504)