Is there something fundamentally wrong with using patch in a gallery in a collection. I know its right. Its far too simple.
As shown below. You pick the mail icon, and false should change to true. nothing happens, no errors.
Column three is Thisitem.EmailFlagged. Initial values are false, it should flip to true.
Solved! Go to Solution.
Ok, I figured it out. I thought I had a pre-posted value of "false" in all my records. Turned out they didn't all get it. Blank showed as false but didnt toggle. I got all the data posted with false now in my addcolumns() command. I'm good now.
They date refreshes immediately too, as it should. Even the counter I made. Its perfect now. Thanks everyone! Kudos deployed...
Is MDL_ALL the name of your collection?
Is the gallery Items property based on the same collection?
I would think you need to do a Lookup() using a unique property of thisitem, something like this.
patch(mdi_All, Lookup(mdi_All, ID = thisitem.Id),{EmailFlagged:true})
ThisItem alone identifies the item in the gallery, but not in the data source and that's what you need to patch.
If the gallery is based on the same collection then Thisitem should suffice
@Pstork1 ,
I tried that too. No go. Same result.
Yes, that is what I thought. I have used this before. Its nothing new to me. Its just pure not working. Some nuance somewhere I'm missing.
I still need some resolution here. Knowing its right, I have nowhere else to look that is rational.
I know this is working. I put a context variable in it and a free floating label, and its updating.
Patch(MDL_All,LookUp(MDL_All,ID=ThisItem.ID),{EmailFlagged:true});
UpdateContext({TestFlip:!TestFlip})
There are still no errors, no red lines, no nothing.
My label flips between true/false. But, my gallery is still unaffected.
is the collection updating?
did you check the collection under view- collections to see if the updates are being pushed through?
Can you also share screenshot of items property of gallery
Do you perhaps need to throw either a Refresh() or Reset() in there somewhere to pick up the change submitted via patch?
Ok, I figured it out. I thought I had a pre-posted value of "false" in all my records. Turned out they didn't all get it. Blank showed as false but didnt toggle. I got all the data posted with false now in my addcolumns() command. I'm good now.
They date refreshes immediately too, as it should. Even the counter I made. Its perfect now. Thanks everyone! Kudos deployed...
User | Count |
---|---|
176 | |
116 | |
85 | |
44 | |
41 |
User | Count |
---|---|
240 | |
153 | |
130 | |
77 | |
72 |