cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Continued Contributor
Continued Contributor

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
Highlighted
Super User II
Super User II

Re: disable rows in table based on value in a table column

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
Highlighted
Super User II
Super User II

Re: disable rows in table based on value in a table column

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
)
Highlighted
Continued Contributor
Continued Contributor

Re: disable rows in table based on value in a table column

@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

 

 

Highlighted
Super User II
Super User II

Re: disable rows in table based on value in a table column

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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