PowerApps 中的 Refresh 函数Refresh function in PowerApps

刷新数据源记录Refreshes the records of a data source.


Refresh 函数检索数据源的新副本。The Refresh function retrieves a fresh copy of a data source. 你将看到其他用户所做的更改。You'll see changes that other users made.

Refresh 没有返回值,只可以在行为公式中使用它。Refresh has no return value, and you can use it only in behavior formulas.


Refresh( DataSource )Refresh( DataSource )

  • DataSource - 必需。DataSource – Required. 要刷新的数据源。The data source that you want to refresh.


在此示例中,你将将刷新名为 IceCream 的数据源,该数据源以下面的数据开头:In this example, you'll refresh the data source named IceCream, which starts with this data:

另一个设备上的用户将 Strawberry 记录中的数量更改为 400A user on another device changes the Quantity in the Strawberry record to 400. 此值将保持不变,直到执行以下公式:You won't see this change until this formula executes:

Refresh( IceCream )Refresh( IceCream )

执行此公式后,绑定到 IceCream 数据源的库将显示 Strawberry 更新后的值:After that formula executes, galleries that are bound to the IceCream data source will show the updated value for Strawberry: