@BHS_KI
No, timers are not reliable. How do you know how long to set it? Could take a few seconds or minutes to refresh!
Okay...so a dynamic table variable. Here is what you do.
There is a little known and rarely used property in PowerApps on a datacard. It is called Update. Now, when I refer to a datacard, I'm not referring to one that is in a form, but one that is in a Canvas.
You cannot add a canvas or a datacard to your screen. You have to "bring" it to the screen.
So, here is what you do:
- First, add a new screen to your app and choose to add a Scrollable screen.
- You will now have a new screen that has a couple things in it. The one we are interested in is the Canvas control. You will click on that and then resize the entire canvas to a small size (we don't really need it to display anywhere, we just need the control, so it can be non-visible where it is going). Once that is resized, you will Cut (ctrl-x) the control from the screen. You can then delete the screen as well as we don't need it.
- Now, back on your other screen, paste that canvas control (ctrl-v) And now you have brought the control to your screen. Let's work with it!
- In the canvas control will be a datacard. Again, we don't care what it looks like as we are not putting any visible controls in it. BUT, we are interested in the Update property of that Datacard.
- The Update property of that datacard is a Record. It can be ANYTHING you want! All you have to do is define your record there.
{
myItems: yourDataSource/Filter/orAnythingElse
}
- Now, you have a record that will always change when any value in it changes.
- You can reference this just like any other record.
SO, in your case, you would replace the "yourDataSource" part in the Update formula to be your view
And now, this is a table for you to use.
So you can set your Default property of the Gallery to: LookUp(DataCard1.Update.myItems, ID=yourPatchedID)
This will then all dynamically change once the refresh completes.
These type of dynamic record and table variables really change things!!