添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

The If block

If block

The If block is a logical gate that sends data from one of two output ports based on the result of an evaluation. It's a useful block for branching your flow according to specific conditions.

Using TypeScript scripts or Flows Query Language (FQL) queries, you can set up the If block to process and evaluate data provided by data blocks. You can then send incoming data from the If block's THEN or ELSE output port. The If block has built-in artificial intelligence (AI) to help you create FQL queries. See Setup for details.

Inputs

variable - Connect a block to this input port to evaluate its data with FQL or TypeScript. Select the Add data blocks icon Add data blocks icon to embed a data block in your If block. You can change an embedded block to a different data block by selecting the embedded block's icon and choosing a block from the dropdown list.

Text box - Enter TypeScript or FQL code to create scripts and queries here. Select the dropdown list at the top of the block to set the text box to use TypeScript or FQL.

Data - Data received by this input port will be sent from the THEN or ELSE output port depending on the result of the TypeScript script or FQL query.

Outputs

Outputs - Sends the information to either the True or False pathway depending on the value of the FQL condition.

Setup

Connect the variable input port to a block providing the data you want to evaluate. Embed data blocks in the If block with the Add data blocks icon Add data blocks icon to evaluate their data.

Connect the Data input port to the block sending the data you want to send from the THEN or ELSE output port.

Select the dropdown list next to the block's title and select FQL or TypeScript . Enter your FQL query or TypeScript script in the text box.

(Optional) If you're using FQL, select the Snippets dropdown list and choose a predefined query.

Example

To see the If block in an example flow, check out Flow Snippets: If .

You can embed the following blocks in the If block to evaluate their data:

  • String
  • Number
  • Select
  •