Skip to main content
Scheduled Maintenance: Trailhead, myTrailhead, and Trailblazer Community will be offline January 17, 16:00–20:00 UTC. Thanks for bearing with us as we update your experience!

예상 시간

주제

커뮤니티에 질문하기

Assign Selections to a Text Variable

Create a Manual Loop with Assignments and a Decision

Next, create the Assignment element that stores the selections in one place as unstructured data, and the Decision element that kicks off the manual loop.

In this Assignment element, copy the selections into a text variable (varStringOfSelectedAccounts). The flow can’t copy these unstructured selections into a collection variable, because collection variables are structured. Instead, copy the selections into a text variable, because text variables can accept unstructured data and the flow can modify them later.

Every time the loop starts again, the Decision element checks whether varStringOfSelectedAccounts has any accounts. If varStringOfSelectedAccounts is blank, the Decision element takes a path that ends the loop.

  1. Create a text variable to contain the string of selected accounts.
    • For Resource Type, select Variable.
    • For API Name, enter varStringOfSelectedAccounts.
    • For Data Type, select Text.
    • Click Done.
  2. Create an Assignment element that copies the selected account IDs into a text variable.
    • For Label, enter Assign Selected Values to varString.
    • Make sure the API Name is Assign_Selected_Values_to_varString.
    • In the first assignment row:
      • For Variable, select varStringOfSelectedAccounts.
      • For Operator, select Equals.
      • For Value, select Select Accounts > Select accounts - all related contacts will be added to this campaign.
    • Click Add Assignment and use these values in the second assignment row:
      • For Variable, select varStringOfSelectedAccounts.
      • For Operator, select Add.
      • For Value, enter ; .
        By default, the final selection doesn't have a semicolon at the end. However, the formulas that control the text look for semicolons after each selection. You add a semicolon to the end of the selection string so that your formulas operate correctly.
  3. After the Assign Selected Values to varString element, create a Decision element that determines whether the manual loop should continue looping (a Not Null path) or exit the loop (an Is Null path).
    • For Label, enter Check varString.
    • Make sure the API Name is Check_varString.
    • In the Outcome Details:
      • For Outcome Label, enter Is Null.
      • Make sure the Outcome API Name is Is_Null.
      • For Condition Requirements to Execute Outcome, select All Conditions Are Met (AND).
      • For Resource, select varStringOfSelectedAccounts.
      • For Operator, select Is Blank.
      • For Value, select True.
    • In the Outcome Order, select Default Outcome.
      • For Label, enter Not Null.
  4. Save the flow.
Salesforce 도움말에서 Trailhead 피드백을 공유하세요.

Trailhead에 관한 여러분의 의견에 귀 기울이겠습니다. 이제 Salesforce 도움말 사이트에서 언제든지 새로운 피드백 양식을 작성할 수 있습니다.

자세히 알아보기 의견 공유하기