PowerApps 中的运算符和数据类型Operators and data types in PowerApps

.. 属性选择器Property Selector Slider1.Value
Color.Red
Acceleration.X
Slider1.Value
Color.Red
Acceleration.X
、控件、信号 或枚举中提取属性。Extracts a property from a table, control, signal, or enumeration. 对于向后兼容性，!For backwards compatibility, ! 也可以使用。may also be used.
..
[或 , ，具体取决于语言]

[或 1,23，具体取决于语言][or 1,23 depending on the language]

( )( ) 括号Parentheses Filter(T, A < 10)Filter(T, A < 10)

(1 + 2) * 3(1 + 2) * 3

+ 算数运算符Arithmetic operators 1 + 21 + 2 加法Addition
-   2 - 12 - 1 减法和减号Subtraction and sign
\*   2 * 32 * 3 乘法Multiplication
/   2 / 32 / 3 除法（另请参阅 Mod 函数）Division (also see the Mod function)
^   2 ^ 32 ^ 3 求幂，相当于 Power 函数Exponentiation, equivalent to the Power function
%   20%20% 百分比（相当于"* 1/100"）Percentage (equivalent to "* 1/100")
= 比较运算符Comparison operators Price = 100Price = 100 等于Equal to
>   Price > 100Price > 100 大于Greater than
>=   Price >= 100Price >= 100 大于或等于Greater than or equal to
<   Price < 100Price < 100 小于Less than
<=   Price <= 100Price <= 100 小于或等于Less than or equal to
<>   Price <> 100Price <> 100 不等于Not equal to
& 字符串连接运算符String concatenation operator "hello" & " " & "world""hello" & " " & "world" 使多个字符串连续显示Makes multiple strings appear continuous
&& 或 And&& or And 逻辑运算符Logical operators Price < 100 && Slider1.Value = 20Price < 100 && Slider1.Value = 20

||Or|| or Or   Price < 100 || Slider1.Value = 20Price < 100 Or Slider1.Value = 20Price < 100 || Slider1.Value = 20 or Price < 100 Or Slider1.Value = 20 逻辑或，相当于 Or 函数Logical disjunction, equivalent to the Or function
!! Notor Not   !(Price < 100)Not (Price < 100)!(Price < 100) or Not (Price < 100) 逻辑非，相当于 Not 函数Logical negation, equivalent to the Not function
exactinexactin 成员运算符Membership operators Gallery1.Selected exactin SavedItemsGallery1.Selected exactin SavedItems 属于集合或表Belonging to a collection or a table
exactinexactin   "Windows" exactin “To display windows in the Windows operating system...”"Windows" exactin “To display windows in the Windows operating system...” 子字符串测试（区分大小写）Substring test (case-sensitive)
inin   Gallery1.Selected in SavedItemsGallery1.Selected in SavedItems 属于集合或表Belonging to a collection or a table
inin   "The" in "The keyboard and the monitor...""The" in "The keyboard and the monitor..." 子字符串测试（不区分大小写）Substring test (case-insensitive)
@ 消除歧义运算符Disambiguation operator MyTable[@fieldname]MyTable[@fieldname] 字段消除歧义Field disambiguation
@   [@MyVariable][@MyVariable] 全局消除歧义Global disambiguation
,,
[或 ; ，具体取决于语言]

{ X: 12, Y: 32 }{ X: 12, Y: 32 }
[ 1, 2, 3 ][ 1, 2, 3 ]
[or If( X < 10; "Low"; "Good" )
{ FirstName: "Jane"; LastName: "Doe" }
[ 1; 2; 3 ]
]
[or If( X < 10; "Low"; "Good" )
{ FirstName: "Jane"; LastName: "Doe" }
[ 1; 2; 3 ]
]

. 此字符取决于语言。This characters is dependent on the language.
;;
[或 ;; ，具体取决于语言]

[or Collect(T; A);; Navigate(S1; "")][or Collect(T; A);; Navigate(S1; "")]

ParentParent Parent 运算符Parent operator Parent.FillParent.Fill 控件容器属性的访问权限Access to properties of a control container
ThisItemThisItem ThisItem 运算符ThisItem operator ThisItem.FirstNameThisItem.FirstName 库或窗体控件字段的访问权限Access to fields of a Gallery or form control

in 和 exactin 运算符in and exactin operators

1. 创建或导入一个名为“清单”的集合，并在库中显示它，如在库中显示图像和文本所述的第一个过程。Create or import a collection named Inventory, and show it in a gallery, as the first procedure in Show images and text in a gallery describes.
2. 将库的 Items 属性设置为以下公式：Set the Items property of the gallery to this formula:
Filter(Inventory, "E" in ProductName)Filter(Inventory, "E" in ProductName)

库显示除 Callisto 以外的所有产品，因为该产品的名称是唯一不包含你所指定的字母的产品。The gallery shows all products except Callisto because the name of that product is the only one that doesn't contain the letter you specified.

3. 将库的 Items 属性更改为以下公式：Change the Items property of the gallery to this formula:
Filter(Inventory, "E" exactin ProductName)Filter(Inventory, "E" exactin ProductName)

库仅显示 Europa，因为只有它的名称中包含你所指定的字母。The gallery shows only Europa because only its name contains the letter that you specified in the case that you specified.

Parent 运算符Parent operator

PowerApps 中的任何控件都可由应用内任何位置的名称引用。Any control in PowerApps can be referenced by name from anywhere within the app. Screen1 可能是应用中屏幕的名称。Screen1 may be the name of a screen in your app. 若要检索此屏幕的背景色，可以使用 Screen1.FillTo retrieve the background color of this screen, you can use Screen1.Fill.

消除歧义运算符Disambiguation operator

• 若要访问来自嵌套记录作用域的值，请使用 @ 运算符，其中所操作的表名称使用模式 Table[@*FieldName]。To access values from nested record scopes, use the **@* operator with the name of the table being operated upon using the pattern Table[@FieldName].
• 若要访问全局值，如数据源、集合和上下文变量，请使用模式 [@ObjectName]（无需指派表）。To access global values, such as data sources, collections, and context variables, use the pattern *[@ObjectName*] (without a table designation).