# PowerApps 中的運算子和資料類型Operators and data types in PowerApps

.. 屬性選擇器Property Selector Slider1.Value
Color.Red
Acceleration.X
Slider1.Value
Color.Red
Acceleration.X

..
[或 , ，視語言而定]

[或 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   價格 < 100 || Slider1.Value = 20價格 < 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. 建立或匯入名為 Inventory 的集合，並將其顯示在資源庫中，如顯示資源庫中的影像和文字中的第一個程序所述。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.

## 去除混淆運算子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).