cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
livingstonep
Level 8

how to mark the current record as "dirty" in a Gallery Control

Hi, we are using a gallery control in our PowerApp...

 

The gallery is linked to a de-normalized SharePoint List that cannot be changed as it is used a source by external applications...

 

The list consists of boxes, of several items. The boxes are identified by the box no, and the store code (T-Code). In the below image you can see what the list looks like - there are 3 columns highlighted in red, and these are the columns that would trigger an update on the list, for all records with that T-Code and BoxNo:

Capture4.PNG

 

At the box level, the user can change any one of those 3 fields in the gallery, and when they are changed, all of the records in the list for that box are to be updated...

 

The problem is that this means the user has to put up with waiting several seconds while the list is patched, for each of the child items in that box.

 

The user can modify 3 fields in the gallery, and when they are changed, all the child items are updated using Patch in a ForAll

 

So when the user makes a change, we want to mark the record as dirty in the gallery, and enable the Update button for that record so the user can choose when to update the box ...

Capture2.PNGCapture3.PNG

 

Currently you can see we have an Edit box checkbox at the left of the gallery, and we use that to control the DisplayMode of the Update button...

 

So how can we get rid of the checkbox, and have the record marked as Dirty when the user changes either of the three fields Delivery Method, Tote (Yellow Tag) ID ("SealNumber" in the List), or Preferred Collection Date

 

We cannot use a dirty variable as it would be general for all records in the gallery thanks for any help or advice

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: how to mark the current record as "dirty" in a Gallery Control

Hi @livingstonep,

Do you want to get rid of the checkbox, and have the record marked as Dirty when the user changes either of the three fields?

Could you please share a bit more about the DeliveryMethod column in your SP list? Is it a Choice type column?

I have made a test on my side, please take a try with the following workaround:7.JPG

Set the DisplayMode proeprty of the "Update" button to following:

If(
Dropdown1.Selected.Value<>ThisItem.DeliveryMethod || TextInput1.Text<>ThisItem.SealNumber || Text(DatePicker1.SelectedDate)<>ThisItem.PreferredCollectionDate,
DisplayMode.Edit,
DisplayMode.Disabled
)

On your side, you should type the following:

If(
DeliveryMethodDropdown.Selected.Value <> ThisItem.DeliveryMethod.Value ||
Tote(Yellow Tag)IdTextInput
.Text <> ThisItem.SealNumber ||
Text(PreferredCollectionDatePicker1.SelectedDate) <> Text(ThisItem.PreferredCollectionDate),
DisplayMode.Edit,
DisplayMode.Disabled
)

Note: I assume that the DeliveryMethod column in your SP list is a Choice type column.

Please check the attached GIF screenshot for more details:

 

Best regards,

Kris

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

3 REPLIES 3
Community Support Team
Community Support Team

Re: how to mark the current record as "dirty" in a Gallery Control

Hi @livingstonep,

Do you want to get rid of the checkbox, and have the record marked as Dirty when the user changes either of the three fields?

Could you please share a bit more about the DeliveryMethod column in your SP list? Is it a Choice type column?

I have made a test on my side, please take a try with the following workaround:7.JPG

Set the DisplayMode proeprty of the "Update" button to following:

If(
Dropdown1.Selected.Value<>ThisItem.DeliveryMethod || TextInput1.Text<>ThisItem.SealNumber || Text(DatePicker1.SelectedDate)<>ThisItem.PreferredCollectionDate,
DisplayMode.Edit,
DisplayMode.Disabled
)

On your side, you should type the following:

If(
DeliveryMethodDropdown.Selected.Value <> ThisItem.DeliveryMethod.Value ||
Tote(Yellow Tag)IdTextInput
.Text <> ThisItem.SealNumber ||
Text(PreferredCollectionDatePicker1.SelectedDate) <> Text(ThisItem.PreferredCollectionDate),
DisplayMode.Edit,
DisplayMode.Disabled
)

Note: I assume that the DeliveryMethod column in your SP list is a Choice type column.

Please check the attached GIF screenshot for more details:

 

Best regards,

Kris

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

livingstonep
Level 8

Re: how to mark the current record as "dirty" in a Gallery Control

Hi kris, yes the Delivery Method is a choice field... your help is very much appreciated... However, one question I have, how do we ensure that all other records in the gallery are locked/read-only until either the current record is updated, or cancelled? thanks for this...
Community Support Team
Community Support Team

Re: how to mark the current record as "dirty" in a Gallery Control

Hi @livingstonep,

Do you want the other records to be locked/read-only until the current record is updated or canceled?

If you want the other records to be locked/read-only until the current record is updated or canceled, I have made a test on my side, I afraid that there is no way to achieve your needs in PowerApps currently.

 

Best regards,

Kris

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.

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,300)