Skip to main content

1. Use Cases

Association Organization is typically used in the following scenarios:
  • Cross-organization communication, business approval, and work reporting.
  • Multi-organization permission management with real-time user structure synchronization for higher management efficiency.

2. Implementation Steps

2.1 Step 1: Basic Form Design

2.1.1 Create and Configure the Query Form

Steps:
  1. Create a regular form and name it “Get Organization Info”.
  2. Add a dropdown Select component, name it “Target”, and add two options: “Query Parent Organization” and “Query Branch Organization”. Set it as required. (See Figure 2.1-1.)
Figure 2.1-1 Adding and configuring the dropdown Select component
  1. Click Save in the upper-right corner of the page.

2.1.2 Create and Configure the Query Result Record Table

Steps:
  1. Create a regular form and name it “Parent Organization Query Result Record”.
  2. Add a Multi-line text component, name it “Connector Return Result”, and set its status to hidden. (See Figure 2.1-2.)
Figure 2.1-2 Adding and configuring the Multi-line text component
  1. Add a subform component, name it “Parent Organization Query Result”, and set its status to read-only. (See Figure 2.1-3.)
Figure 2.1-3 Adding and configuring the subform component
  1. Inside the subform, add two Single-line text fields named “Parent Organization Name” and “Parent Organization CorpID”, and set their status to read-only. (See Figure 2.1-4.)
Figure 2.1-4 Adding and configuring the Single-line text component
  1. Open the JS Action Panel on the left side of the page and add the following code to the didMount function. (See Figure 2.1-5.)
Figure 2.1-5 Configuring the JS panel content
  1. Click Save in the upper-right corner of the page.
  2. Repeat steps 1–6 to create the “Branch Organization Query Result Record”. (See Figure 2.1-6 for the result.)
Figure 2.1-6 Creating the “Branch Organization Query Result Record” form

2.2 Step 2: Create and Configure the Connector

For an introduction to the YiDA Connector feature, see Integration & Automation - Connector.
Create a connector for the “Get Organization Info” form to retrieve information about associated organizations. Steps:
  1. Go to the backend management page > Get Organization Info > Integration & Automation > Create Integration & Automation. (See Figure 2.2-1.)
Figure 2.2-1 Connector entry
  1. Name the connector “Query Association Organization Info”, select Form event trigger as the trigger type, and click Confirm.
(See Figure 2.1-2.) Figure 2.2-2 Creating the connector
  1. Name the connector “Query Association Organization Info” > select Create Success under Form event trigger > select All Data under Data filter > click Confirm. (See Figure 2.2-3.)
Figure 2.2-3 Configuring the connector Form event trigger
  1. Add a Conditional Branch node. When the condition rule Target equals “Query Parent Organization”, add the Get Parent Organization connector and a Create Data data node. Otherwise, add the Get Branch Organization connector and a Create Organization data node. (See Figure 2.2-4.)
Figure 2.2-4 Adding and configuring branch conditions
  1. Configure the connector under Branch 1.
Figure 2.2-5 Selecting the connector app under “Branch 1” Figure 2.2-6 Selecting the connector execution action for “Branch 1” Figure 2.2-7 Configuring the connector execution action under “Branch 1”
  1. Configure the Create Data node under Branch 1. (See Figure 2.2-8.)
Figure 2.2-8 Adding and configuring the “Create Data” node under “Branch 1”
  1. Configure the connector under Branch 2.
Figure 2.2-9 Selecting the connector app under “Branch 2” Figure 2.2-10 Selecting the connector execution action under “Branch 2” Figure 2.2-11 Configuring the connector execution action under “Branch 2”
  1. Configure the Create Data node under Branch 2. (See Figure 2.2-12.)
Figure 2.2-12 Configuring the “Create Data” node under “Branch 2”
  1. Click Save in the upper-right corner of the page, then click Publish.

2.3 Step 3: Submit Form Data

Trigger the connector, receive the data it returns, and display the processed result. Steps: Fill in the Form Data and submit. (See Figure 2.3-1.) Figure 2.3-1 Submitting Form Data

3. Result Preview

Figure 3-1 Connector result preview