cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Sheff
Level: Powered On

Conditional Onselect for Datatable

Hi, I am using an If/IsBlank statement to determine wether or not a record exists with particular parameters. In this column I get "Needed" or "Completed".  I would like to make this an active hyperlink with the OnSelect using a condition to determine which screen to send the user when clicked. 
This doesnt appear to be working: 

If(StatusCol.Text = "Needed", Navigate(Screen1), Navigate(screen2))

Are If Statements able to be used in the OnSelect property of a Datatable? 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Conditional Onselect for Datatable

Hi @Sheff ,

Do you want to navigate to different screens based on the corresponding Status Column value?

 

Based on the formula you provided, I think there is something wrong with it. The result the StatusCol.Text formula returns is always blank.

 

As an alternative solution, please consider take a try with the following workaround:

Please modify your formula as below (I assume that your data source is a SP List😞

If(
DataTable1.Selected.Status.Value = "Needed", /* <-- Status is a Choice type column in your SP list, which used to store the "Needed" value and "Completed" */
Navigate(Screen1),
Navigate(screen2)
)

 

If your data source is not a SP list, and the Status column is a Text type column, please modify above formula as below:

If(
   DataTable1.Selected.Status = "Needed"
   Navigate(screen2)
)

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Conditional Onselect for Datatable

Hi @Sheff ,

Do you want to navigate to different screens based on the corresponding Status Column value?

 

Based on the formula you provided, I think there is something wrong with it. The result the StatusCol.Text formula returns is always blank.

 

As an alternative solution, please consider take a try with the following workaround:

Please modify your formula as below (I assume that your data source is a SP List😞

If(
DataTable1.Selected.Status.Value = "Needed", /* <-- Status is a Choice type column in your SP list, which used to store the "Needed" value and "Completed" */
Navigate(Screen1),
Navigate(screen2)
)

 

If your data source is not a SP list, and the Status column is a Text type column, please modify above formula as below:

If(
   DataTable1.Selected.Status = "Needed"
   Navigate(screen2)
)

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Sheff
Level: Powered On

Re: Conditional Onselect for Datatable

Perfect, thanks @v-xida-msft.

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (4,236)