web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Conditional Onselect f...
Power Apps
Answered

Conditional Onselect for Datatable

(0) ShareShare
ReportReport
Posted on by 20

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? 

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    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,

  • Sheff Profile Picture
    20 on at

    Perfect, thanks @v-xida-msft.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard