cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

disable rows in table based on value in a table column

Is there a way to disable rows in a table "tbl_Tasks"  , If one row has a value of "Open"

 

powerapps status.jpg

Dave 

1 ACCEPTED SOLUTION

Accepted Solutions

Oops! Sorry, misinterpreted your post. I assumed that was a 'table' in the form a Gallery with a header.

Data Tables are notoriously simple; I am not aware of any way to have individual rows have a different behavior.

 

That being said, since you appear to be using other controls based on the Data Table's selection, you could dynamically set those external control's DisplayMode based on the Data Table's value.

 

As long as the Data Table and DisplayMode criterias are identical, should work. Not a fool-proof solution, but can mirror the inclusion of a row with value X, and the displaymode of a control. This also assumes that "Disable a Row" means you are precluding the user from editing the row, if selected.

View solution in original post

3 REPLIES 3
Super User II
Super User II

So only disable the row that is "Open", or disable the whole thing if a single row is "Open"?

 

For rows-based disabling, you'd need to set the controls in the gallery to dynamically disabled based on the row's value.

Here's an example using the CDS OOB Account entity, and status field, for the DisplayMode of the controls within a gallery.

If(
    ThisItem.Status = 'Status (Accounts)'.Active,
    DisplayMode.Edit,
    DisplayMode.Disabled
)

@GarethPrisk   I do not have a gallery, its a table on the screen.

 

 

So only disable the row that is "Open", or disable the whole thing if a single row is "Open"?

if ONE single row has  "Open"  disable any others rows that have  "In Progress"

if all say "In Progress" do not disable any rows.

But Again I'm using a table not a gallery.

dave

 

 

Oops! Sorry, misinterpreted your post. I assumed that was a 'table' in the form a Gallery with a header.

Data Tables are notoriously simple; I am not aware of any way to have individual rows have a different behavior.

 

That being said, since you appear to be using other controls based on the Data Table's selection, you could dynamically set those external control's DisplayMode based on the Data Table's value.

 

As long as the Data Table and DisplayMode criterias are identical, should work. Not a fool-proof solution, but can mirror the inclusion of a row with value X, and the displaymode of a control. This also assumes that "Disable a Row" means you are precluding the user from editing the row, if selected.

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (48,182)