Choose A number of Data within the Lookup Element

Final Up to date on December 7, 2022 by Rakesh Gupta

Huge Concept or Enduring Query:

  • Permit your customers to pick a couple of document when utilizing lookup Element.

This weblog is a sequel to my earlier weblog – What? Use Lookup Field into a Flow Screen Element?!!Within the earlier weblog, I mentioned methods to configure lookup element for display circulate.

This text goes a step forward and explains methods to configure the Lookup circulate display element in order that customers can search and choose a couple of document.


After studying this weblog, you’ll be capable to:  

  • Create a Display screen Move and add Display screen aspect to it.
  • Add lookup element to your display aspect
  • Set the utmost alternatives for lookup aspect
  • Replace a number of data utilizing In operator
  • And rather more

Edward Backhouse is working as a System Administrator at Gurukul on Cloud (GoC). he has obtained the next requirement from the administration:

  1. Add a display circulate on the house web page, that enable customers to pick a number of alternatives
  2. Ultimately, replace the proprietor for chosen alternatives to logged-In consumer.

Automation Champion Method (I-do):

After Winter’23 launch customers can search after which choose a couple of document with the Lookup circulate display element. As an circulate configurator you’ll be able to specify a range most and a number of default data.

Earlier than we proceed additional, allow us to perceive the traits of the Lookup element.

Attribute Description
API Title An API title can embrace underscores and alphanumeric characters with out areas. It should start with a letter and might’t finish with an underscore. It can also’t have two consecutive underscores.
Area API Title The API title of a lookup discipline on the supply object.
Label Person-friendly textual content that shows to the left of the element.
Object API Title The API title of the supply object.
Most Choices The utmost variety of data that the consumer can choose. The default worth is 1.
Document Id Initially, if Most Choices is 1 or Most Choices is larger than 1 and the Document ID Assortment discipline is null, the document ID chosen by default for the lookup.

When a consumer runs the circulate, the worth modifications to the circulate consumer’s choice.

Document Id Assortment Initially, if Most Choices is larger than 1, the default document IDs for the lookup.

If Most Choices is larger than 1 and the Document ID discipline is null, the primary worth is the document IDs chosen by default for the lookup.

You possibly can specify any variety of document IDs as much as the Most Choices worth.

When a consumer runs the circulate, the worth modifications to the circulate consumer’s alternatives.

Require Requires customers to enter a worth earlier than they will transfer to the subsequent display.

Earlier than discussing the answer, let me present you a diagram of a Course of Move at a excessive degree. Please spend a couple of minutes going by means of the next Move diagram and understanding it.

Let’s start constructing this automation course of.

Guided Observe (We-do):

There are Four steps to unravel Edward’s enterprise requirement utilizing Display screen Move. We should: 

  1. Outline circulate properties for display circulate
  2. Add a Display screen aspect
    1. Add a Lookup Element that enable customers to pick a number of alternative data
  3. Add an Replace Data aspect to replace the alternatives proprietor
  4. Add a display circulate to the lightning residence web page

Step 1: Outline Move Properties

  1. Click on Setup.
  2. Within the Fast Discover field, kind Flows.
  3. Choose Flows then click on on the New Move.
  4. Choose the Display screen Move choice and click on on Create and configure the circulate.
  5. It’s going to open the circulate designer for you.

Step 2: Add a Display screen Factor 

  1. On Move Designer, click on on the +icon and choose the Display screen aspect.
  2. Enter the next info:
    1. Enter Label the API Title will auto-populate.
  3. Click on Achieved

Step 2.1: Add a Lookup Element that Permit Customers to Choose A number of Alternative Data

  1. Underneath Enter part on Display screen Factor. Drag and drop Lookup onto the display. 
  2. Enter the next info:
    1. Enter API Title.
    2. Area API Title: OpportunityId
    3. Label: Choose Alternatives (Enter a label that seems subsequent to the lookup management)
    4. Object API Title: Quote ( Enter the item API title) 
    5. Most Choice: 10
    6. Required: {!$GlobalConstant.True}
  3. Click on Achieved.

Step 3: Add Motion – Replace Data

The subsequent step is to replace the chosen alternative proprietor. We’ll use the Replace Data aspect. 

  1. On Move Designer, click on on the +icon and choose the Replace Data aspect.
  2. Enter a reputation within the Label discipline; the API Title will auto-populate.
  3. For Discover Data to Replace and Set Their Values choose Specify situations to determine data, and set fields individually
  4. Object: Alternative
  5. Choose All Circumstances Are Met (AND)
  6. Set Filter Circumstances
    1. Row 1:
      1. Area: Id
      2. Operator: In
      3. Worth: {!SelectOpportunities.recordIds}
    2. Click on Add Situation
    3. Row 1:
      1. Area: OwnerId
      2. Operator: Does Not Equal
      3. Worth: {!$Person.Id}
  7. Set Area Values for the Alternative Data
    1. Row 1:
      1. Area: OwnerId
      2. Worth: {!$Person.Id}
  8. Click on Achieved.

Ultimately, Edward’s Move will appear like the next screenshot:

As soon as all the pieces seems good, carry out the steps under:

  1. Click on Save.
  2. Enter the Move Label the API Title will auto-populate.
  3. Click on Present Superior.
  4. API Model for Operating the Move: 56
  5. Interview LabelChoose A number of Data – Lookup Instance {!$Move.CurrentDateTime}
  6. Click on Save.

Virtually there! As soon as all the pieces seems good, click on the Activate button.

Step 4: Add a Display screen Move to the Lightning Dwelling Web page

The subsequent step is to distribute a circulate to Lightning Expertise or Salesforce app customers by embedding it on a Lightning residence web page.

Proof of Idea

Formative Evaluation:

I need to hear from you!

What’s one factor you discovered from this put up? How do you envision making use of this new data in the true world? Be at liberty to share within the feedback under.

Source link

Thanks for Reading

Enjoyed this post? Share it with your networks.

Leave a Feedback!