Skip to content
Latest commit c9ef291 Apr 18, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
.vscode Removed 'Filtered' Components Mar 24, 2018
config added lookupFSC Feb 12, 2018
force-app/main/default Merge pull request #144 from ludocal/validateLookupFSC Mar 30, 2019
mdapi misc Jun 12, 2018
.forceignore added lookupFSC Feb 12, 2018
README.md Update README.md Apr 18, 2019
deploynow fixes to lookup FSC Feb 15, 2018
sfdx-project.json added lookupFSC Feb 12, 2018

README.md

Lookup Combobox Control

A Flow Component solution

This is a simple adaptation of the excellent Lightning Lookup control by Opfocus.

screen shot 2018-02-11 at 8 38 20 pm

Install this Component Into Your Org

Install this Component.

How It Works

There are several powerful filtering mechanisms now built into this component, and you probably won't need to use all of them at the same time.

Filter Using Flow Variables This allows you to specify the name of the specific field you want to filter on. It's easy but basic.

Filter using a SOQL 'where' clause This allows richer filtering. See 'Where Clause Usage' below

Dependent Filtering

You can stick two of these components on a screen and have the second component filter on the selection set in the first component. See example 2 below

Multiple Dependent Filtering

You can include multiple Parent/Child groupings on a single screen by identifying each Parent component with a unique ID and specifying the related Parent ID for each Child component.

This component exposes the following attributes that can be set in Flow:

Basic Attributes

  • label="I1_Object Name" This is the actual object that will be looked up
  • label="I2_Display Which Field?" This is the field that will show up in the list box to represent a record. It defaults to "Name"
  • label="I3_Field Label" This is just the label that appears next to the lookup control
  • label="I4_Output Which Field as Value?" This is the field you actually want saved into the Output Value attribute. It defaults to Id so you can hav ean Id to use for lookups, but you may want to change it to Name or some other value.
  • label="O1_Output Value" This will hold the value that is selected, for use downstream in the flow. If a value is provided as an Input parameter, it will be passed to the O1_Output Value Output parameter if no record is selected.

Advanced Attributes

  • label="I5_'Parent' or 'Child' Lookup?" If Child is entered, the filter value will be replaced by the value returned by the Parent lookup on the same screen.

  • label="I6_Filter on which field?" This is the name of the field to filter the lookup on.

  • label="I7_Filter Value" This is the filter value for the lookup.

  • label="Where Clause" allows the input of a "where" SOQL style filter to limit which values are available for selection.

  • label="Default" You can specify a default value placeholder in the lookup field

  • label="Component ID" You can group multiple Parent/Child components on a single Flow screen. Add a unique value here for each Parent Lookup.

  • label="Parent ID" For a Child Lookup, enter the Component ID of its Parent Lookup here to link them together.

Here's an example of a configured component: screen shot 2018-02-11 at 8 48 18 pm

NEW PARAMETER - Default Value Usage

OPTION 1

You can enter a default value for the input field (I2_Display Which Field). When provided, it will override any WhereClause and display the default value as Placeholder text in the input field. You will still need to select the dropdown then select the single value that is displayed. If you start to overtype the input field, the default value will be cleared and the WhereClause (if provided) will be reset and the field will act like a normal filtered lookup with search.

OPTION 2

Provide INPUT values for the following two parameters:

Default Value: (whatever placeholder text you want displayed in the input box)

O1_Output Value: The value to be passed out through the O1_Output Value OUTPUT parameter if no value is selected in the input box

Example: Looking up an Account, defaulting to the Account Name of "ACME Company". Assume the RecordId for ACME Company is stored in the flow variable vDefaultId.

[Input Section]

  • API Name: AcctLookup
  • Component ID:
  • Default Value: ACME Company
  • I1_Object Name: Account
  • I2_Display Which Field? Name
  • I3_Field Label: Account
  • I4_Output Which Field as Value? Id
  • I5_ Parent or Child Lookup?
  • I6_Filter on which field?
  • I7_Filter Value:
  • O1_Output Value: {!vDefaultId}

[Output Section]

  • O1_Output Value: {!vSelectedAccountId} (a text variable)

Where Clause Usage

Input is dependent on the fields available for the object selected for "Object Name".

For example, if you wish to return only accounts of type "Vendor" or "Partner" you could enter the Object Name: "Account" and the where clause: "Type='Vendor' or Type='Partner'"

Filtered Lookup Examples

Example 1: Lookup a Case filtered by an Account where the ID is passed into the flow variable vInputAcctId

screen shot 2018-04-15 at 10 17 54 am

Example 2: Lookup an Account and a Contact on the same screen and only select from Contacts from the selected Account

screen shot 2018-04-15 at 10 18 06 am

Resources

Want to suggest an improvement or report a bug? Do that here

Learn more about how Flow Components work

Know a little javascript and want to add some improvements? {Pull requests are welcome}(/pulls) If you're thinking of adding much complexity to the user interface, though, you probably should fork the repo, because we want to keep this baseline version easy-to-use.

You can’t perform that action at this time.