I have a gallery that lists anywhere from 1 to 4 records and is filtered by another field as below:
SKU_number is tied to a Blend_ID (those are both outside the gallery) and the gallery is filtered by said Blend_ID. I am able to patch all items successfully but yet I want to be able to go back into that "batch record" and see the values that were patched. I was doing this with a lot of if statements and lookups for every field in the gallery. But there has to be an easier way.
Also I would like to be able to update a specific record. Say the gallery has 4 items and I only need to update the Lot_Number field of one. How can I do that? I have tried adding a button to the gallery and patch that specific record but it wasn't working correctly. It was updating the wrong record in the DB.
My table has the following fields and the underlined ones are in the gallery:
ID(pk), Batch_Number, Green_Date, Green_ID(fk), Green_Lot_Number, Green_Weight, Green_Operator.
I have tried filtering my update patch by the ID and Batch_Number but it returns the wrong value (it always returns 1) as I was using First(Filter(....
Thanks for the help.
Solved! Go to Solution.
If I'm envisioning the description correctly then I would suggest two things.
1) Yes, make the Blend a dropdown if possible to remove user error when entering
2) bind your gallery to a collection and when you grab the filtered datasource put it in the collection, then display that in the gallery. Let the user make all the changes they need to the items in the gallery (actually in the collection) then have a submit button to commit that batch of changes back to the datasource. Until they commit the changes they can easily go back and make corrections.
The Key here is to recognize that a Gallery doesn't actually hold any records. It displays a Sorted and Filtered view of records retrieved from a datasource or collection. So if you want to change an existing record in a gallery what you need to do is change the underlying record in the datasource or collection and then refresh that datasource. The gallery will then show the new data.
Hello @Pstork1 ,
That is key!! Thank you for explaining that a gallery is just a view. I was spinning my wheels for hours last night.
Is there another way to display the recipe of the blend without the filtered gallery? Other wise everytime the user enters the wrong info I will have to go in and change it. Not a big deal though. Or I wonder if it would be better to have that field be a filtered dropdown of available lot numbers, then the user selects the appropiate one. Then no updating would need to be done unless they select the wrong Lot but I imagine the number of times that happens would be minimal to the typos of a text input field.
Thank you for the reply.
If I'm envisioning the description correctly then I would suggest two things.
1) Yes, make the Blend a dropdown if possible to remove user error when entering
2) bind your gallery to a collection and when you grab the filtered datasource put it in the collection, then display that in the gallery. Let the user make all the changes they need to the items in the gallery (actually in the collection) then have a submit button to commit that batch of changes back to the datasource. Until they commit the changes they can easily go back and make corrections.
I think the easiest way is to have the filtered dropdown. I feel that would eliminate 99% of the issue. I know I won't have issues updating the other screens as they do not contain a gallery.
Thank you for the replies
User | Count |
---|---|
122 | |
87 | |
86 | |
75 | |
67 |
User | Count |
---|---|
214 | |
180 | |
137 | |
96 | |
83 |