PowerApps 中的 Enable 和 Disable 函数Enable and Disable functions in PowerApps

打开或关闭信号Turns a signal on or off.

概述Overview

某些信号可能经常发生变化,这要求应用在信号更改时重新计算结果。Some signals can change often, requiring the app to recalculate as they do. 长时间内快速更改可能会耗尽设备电池的电量。Rapid changes over a long period of time can drain a device's battery. 可以使用这两个函数手动打开或关闭信号。You can use these functions to manually turn a signal on or off.

未使用某个信号时,这个信号就会自动关闭。When a signal isn't being used, it's automatically turned off.

说明Description

EnableDisable 函数分别用于打开和关闭信号。The Enable and Disable functions turn a signal on and off, respectively.

这两个函数仅对定位信号有效。These functions currently only work for the Location signal.

这两个函数没有返回值。These functions have no return value. 它们只能在行为公式中使用。You can use them only in behavior formulas.

语法Syntax

Enable( Signal )Enable( Signal )
Disable( Signal )Disable( Signal )

  • Signal - 必需。Signal - Required. 要打开或关闭的信号。The signal to turn on or off.