Getvalue
此説明頁面適用於 Desktop Studio。 此資訊亦適用於 Studio。
|
|
從 如要檢索整個 array,請使用 GETLIST 動作。 |
支援的程式碼類型
|
|
|
|
|
|
```
|
|
|
|
通用 |
電郵 | 聊天 | 電話 | 語音郵件 | 工作項目 | SMS |
|
相關動作
This action is one of several actions that store and retrieve data from a database table in order to make the data accessible to other scripts; it behaves like a list of fields or values. Use them for storing multiple values, or values needed further along in other scripts. The complete list of actions, including this action, is:
這些動作使用一種僅可用這一組 Studio 動作存取的獨特資料類型。 這些資料無法藉由任何其他方式存取。 無論使用者的權限如何,使用者都無法存取並使用本資料庫。
這些值會在資料庫表中列出有限的時間,此時間設定於 Putvalue 動作的 TTL 小時 屬性中。預設時間為 24 小時,但可設定範圍為 1 小時到 168 小時(7 天)。 在達到 TTL 之前,您可使用 Remvalue 動作刪除資料。這可讓您透過指令碼完全掌控資料。
**注意:**
- 如果其他指令碼或聯絡人需要存取多個變數,一般而言,資料庫是最佳的解決方案。
- 非持久性公共變數可在設定該等變數的指令碼的整個生命週期內,由其他指令碼或聯絡人共用。 這些變數釋放後會自動清除。
輸入屬性
這些屬性定義了動作執行時使用的資料。
|
屬性 |
描述 |
|---|---|
| 標題 |
Enter a short phrase that uniquely identifies this action in the script. The caption appears on the script canvas under the action icon. |
| 範圍 |
選擇此動作處理的值對其他聯絡人的可見程度。 只有共享相同範圍的聯絡人才能存取相同的資料。 選項包括:
重要您選取的 範圍 必須與您在程式碼中所包含的所有其他清單動作所設定的 範圍 相符。這些清單動作為 |
| 名稱 | 用於識別值。 這可以是任何名稱或數字。 名稱不區分大小寫。 當使用Getvalue擷取值時,Name必須相同。 如果Name屬性不相符,即使範圍設定相同,彼此仍無法識別。 |
| 變數 | The name of the variable that you want to hold the retrieved values. |
| DefaultValue | The value you would provide to any record without a matching mapping. Cannot exceed 200 characters. |
| 移除 | True (the default) causes the value to be removed from the Scope property after it is retrieved. False allows repetitive access to the same value. |
結果分支條件
結果分支條件允許您在指令碼中建立分支,以處理執行動作時的不同結果。
|
條件 |
描述 |
|---|---|
|
預設 |
Path taken unless the script meets a condition that requires it to take one of the other branches. It is also taken if the action's other branches are not defined. |
|
NoData |
Path taken if there are no values for the specified properties. |
小貼士及技巧
- 列表根據指定名稱暫時儲存多於一個項目。若要檢索列表中的所有項目,請重複呼叫 Getvalue,或單次呼叫 Getlist。
- 當使用Getvalue檢索多個值時,請將移除屬性設為True。 一旦已檢索了最後一個值,後續來電將觸發 No Data 分支條件。
- 使用 Getvalue 與 Putvalue 動作的示例是會議指令碼。 若要建立此程式碼,發起會議的一方必須使用 Putvalue 儲存其會議 id。 關注的來電者在使用 Getvalue 檢索到會議 id 後,即可加入會議。