NC Lookup

Not yet released: this component will ship in an upcoming Native Rent package version.

NC Lookup is a type-ahead search for one record or several. It can search the server through the UI API, which enforces sharing, object access, and field permissions. Or it can search a record collection the flow already has, in the browser.

Use it to pick a Contact on an Account, a Rentable, or a record from a filtered collection.

NC Lookup, Inline layout on desktop: the results show in the page under the field, not over it.
NC Lookup, Inline layout on desktop: the results show in the page under the field, not over it.

Layouts

LayoutAPI valueWhat the user seesExample
AutoautoDropdown on a wide screen. Inline on a phone or in a narrow column.Leave Auto and let a narrow column switch to inline.
DropdowndropdownResults show over the screen under the search box. The screen does not move.A desktop Contact search with Email and Phone on the second line.
InlineinlineResults show under the search box, as on phones and narrow columns.A phone-width search.
CardscardsResults stay in the page as cards. After a single pick, a selection card with Change shows.Rentable cards with a Color Map dot.

Auto switches to inline when the component is under 600 px wide, or on a phone.

Inline layout with a record picked.
Inline layout with a record picked.

A Style fills the layout, density, detail fields, search fields, and number of results you leave blank: Search picker, Dropdown, or Cards.

The list opens on a click, a tap, typing, or the Up and Down Arrow keys. It does not open when the field only receives focus. Minimum Characters defaults to 0, so a click shows the first records. Filters, sort order, and the result limit still apply.

A "No matches" message shows only when the search box has text. Clearing the box, pressing Escape, clicking outside, or leaving the field closes the results. The results panel never blocks the flow's Next button.

A search with no match shows "No matches" for the typed text.
A search with no match shows "No matches" for the typed text.
After the search box is cleared, the results close and Next stays visible.
After the search box is cleared, the results close and Next stays visible.

Recently used

Show Recently Used is on by default. Recently Used Count is 1 to 20, default 5.

When the user opens the field with an empty search, their last picks for this object and field label show first, under a "Recently used" heading.

Opening an empty NC Lookup shows the last picks under a "Recently used" heading.
Opening an empty NC Lookup shows the last picks under a "Recently used" heading.

Create new

Show Create New is off by default. Create New Label is optional. Blank uses "+ New" and the object label.

The link sits directly under the search box, outside the results panel. When the user clicks it:

  1. Create New Requested is set to true.
  2. Create New Search Text gets the text in the search box.
  3. The typed text stays in the search box.
  4. The flow goes to Next, if the screen offers Next. For this action only, the component skips its Required check, its minimum check, and the check for typed text without a pick. So a required Lookup does not block the create path.

The skip works once. If the user edits the text, picks a record, or later presses a normal Next, the checks run again and Create New Requested and Create New Search Text are cleared. So a required field, or typed text without a pick, still blocks a normal Next.

NC Lookup does not create a record. In the flow, add a Decision after the screen. If Create New Requested is true, go to a create screen. You can fill it from Create New Search Text. Reset Create New Requested when the user comes back, or the Decision runs again. The screen must include Next in its actions.

Show Create New on: the user typed a name with no match. The "+ New account" link shows, and "No matches" shows for the typed text.
Show Create New on: the user typed a name with no match. The "+ New account" link shows, and "No matches" shows for the typed text.
A test screen after the link was clicked: Create New Requested is true, and Create New Search Text holds the typed text.
A test screen after the link was clicked: Create New Requested is true, and Create New Search Text holds the typed text.

Add it to a screen

  1. Add NC Lookup to a screen. Set Label and Object, for example Contact. The Search picker style fills typical title, detail, and search fields.
  2. Optionally set filters, for example AccountId equals the current record, plus search fields and Required.
  3. Map Selected Record Id in and out of a text variable. Map Selected Record if you need more than the Id.
  4. To offer Create new, turn on Show Create New, add Next to the screen, and add a Decision on Create New Requested.
  5. Turn off Show Recently Used on shared or guest machines if needed.

In new flows, use Record Label Field, Record Description Field, Description Format, and Maximum Results (maxChoices) for the title, detail line, detail format, and result count.

Validation

A required NC Lookup after Next: "Select a record to continue."
A required NC Lookup after Next: "Select a record to continue."
Maximum Selections 3 with three records picked: "3 of 3 selected" and "Select at most 3."
Maximum Selections 3 with three records picked: "3 of 3 selected" and "Select at most 3."
A record collection with no records shows the Empty Message.
A record collection with no records shows the Empty Message.

Phone and desktop

Limits

Properties

PropertyAPI nameDefaultDescription
StylestylePreset(blank)search (Search picker), dropdown or cards. Fills in the layout, density, detail fields, search fields and number of results you leave blank; you can still set each one. Blank keeps the original defaults.
LabelfieldLabel(blank)Field label shown above the search box.
ObjectobjectApiName(blank)API name of the object to search, e.g. Contact. With only this set, the picker shows the record name, picks detail fields and search fields for you (with a Style).
RequiredrequiredfalseBlock Next until a record is selected.
Recordsrecords(blank)Instead of a search, a record collection from the Flow, searched in the browser (no server call).
Data Sourcesourceautoauto (default), search or records. Auto: Records set to records, else search.
Record Label FieldrecordLabelField(blank)Field shown as the result title. Default: the object name field (Contact: the full Name).
Record Description FieldrecordDescriptionField(blank)Comma-separated fields for the second line, e.g. Email,Phone. Blank with a Style: chosen for you (e.g. Email, Phone).
Search In FieldssearchFields(blank)Comma-separated text fields to search. Blank: the title field (with a Style also text detail fields such as Email, up to 3).
Placeholderplaceholder(blank)Optional. Blank uses the translated default.
Help TexthelpText(blank)Optional hint under the label.
Label FormatlabelFormat(blank)Optional template for the title, e.g. {Name} ({Code__c}). Plain text only.
Description FormatdescriptionFormat(blank)Optional template for the second line, e.g. {Email} - {Phone}.
Match ModematchModecontainscontains (default) or startswith. startswith is faster on very large objects.
Filter FieldfilterField(blank)search, optional: field to filter on (one relationship hop allowed, e.g. Account.Type).
Filter OperatorfilterOperatoreqeq, ne, in, nin, like, gt, gte, lt or lte.
Filter ValuefilterValue(blank)Value for Filter Field. Sent as a variable, never as query text.
Filter LogicfilterLogicANDAND (default) or OR: how the two filters combine. Blank or missing stays AND, so existing flows are unchanged.
Filter Field 2filterField2(blank)Optional second filter, combined with the first using Filter Logic (default AND).
Filter Operator 2filterOperator2eqOperator for Filter Field 2.
Filter Value 2filterValue2(blank)Value for Filter Field 2.
Order By FieldorderBy(blank)search, optional: sort field. Default the record label field.
Sort DirectionsortDirectionascasc or desc.
Maximum ResultsmaxChoices10Results shown per search (1-50, default 10).
Minimum CharactersminChars(blank)Characters typed before searching (0-10). Default 0: a click or tap shows the first records (filters, sort and the result limit still apply). An explicit value still applies. The list opens on a click, tap, typing or the Up/Down Arrow keys, not when the field only receives focus.
Search IconiconName(blank)Optional SLDS icon in the empty search field. Default utility:search.
Object IconobjectIconName(blank)Icon on results and the selection (SLDS Lookup), e.g. standard:account. Blank: the standard object icon, or standard:record.
Required MessagerequiredMessage(blank)Optional. Blank uses the translated default.
DisableddisabledfalseRead-only.
Layoutlayoutautoauto (default), dropdown, inline or cards. Dropdown and inline overlay the results under the input (the screen does not reflow). Cards keep results in the page flow. Auto: dropdown on wide screens, inline on phones/narrow columns.
Densitydensitycomfortablecomfortable (default) or compact. Compact is 40px only on a wide component with a mouse; 600px or narrower, phones and touch screens keep 44px.
Accent ColoraccentColor(blank)Selected and focus color, e.g. #0B5CAB. Hex, rgb() or a color name. Lightened or darkened until it reaches 3:1 against the tile color (or the theme surface if no tile is set). Also tints the focus ring and the selected/highlighted row. Blank follows the org theme (and dark mode).
Background ColorbackgroundColor(blank)Optional color behind the whole component.
Text ColortextColor(blank)Optional. On choices and results: used as-is on the theme surface, or checked at 4.5:1 against a tile color if one is set. On the label and help: checked at 4.5:1 against the background if one is set; otherwise dark or white text is picked automatically.
Text Sizesizemediumsmall, medium (default), large or xlarge.
Corner Shapeshaperoundedrounded (default), square or pill.
Color Map FieldcolorField(blank)Optional field whose value is looked up in the Color Map (records/query sources). Blank: the choice value (then the label) is used.
Color MapcolorMap(blank)Optional. One color per value, semicolon or new line between. Simple: Value:background/text (text optional), e.g. Gold:#FFF4CC/#5C4400; Silver:#EEEEEE. Mobile Data Table: [{'key':'Gold','value':'#FFF4CC;#5C4400'},{'key':'Silver','value':'#EEEEEE'}].
Color Map StylecolorCuestripestripe (default: colored bar on the edge), tint (light background; use for dark mode), or dot (small colored dot). NC Lookup does not support fill.
Sticky ContinuestickyContinueoffoff (default) or auto (dock the Continue button to the bottom on phones when it is shown).
Empty MessageemptyMessage(blank)records source: optional text when no records are available. Blank uses the translated default.
No Match MessagenoMatchMessage(blank)Optional text when a search has no matches. {0} is the typed text. Blank uses the translated default.
Selection ModeselectionModesinglesingle (default) or multi. Multi adds a pill for each picked record and keeps the search open for the next pick.
Minimum SelectionsminSelections0Multi only. 0 = no minimum.
Maximum SelectionsmaxSelections0Multi only. 0 = no maximum.
Show Recently UsedshowRecentlyUsedtrueWhen the field is opened with an empty search, show this user's last picks first. Stored in this browser only, per user, object and field label. Records that are no longer available are omitted. On by default.
Recently Used CountrecentlyUsedMax5How many recent picks to show (1-20). Default 5.
Show Create NewshowCreateNewfalseAdd a Create new link under the results. When clicked, Create New Requested is set to true, the typed text is sent in Create New Search Text, and the Flow goes Next so a Decision can open a create screen.
Create New LabelcreateNewLabel(blank)Optional. Blank uses + New {object label}.
Navigate After SelectionnavigateOnSelectnonenone, next, back, finish or pause. After a record is picked the Flow moves on, so you can hide the screen's footer buttons. Next and Finish check Required first; Next becomes Finish on the last screen.
Show Continue ButtonshowContinueButtonfalseShow a button that navigates (Navigate After Selection) instead of moving on at once. Always shown for multi select when navigation is on.
Continue Button LabelcontinueLabel(blank)Optional. Blank uses Next, Previous, Finish or Pause (translated).
Available ActionsavailableActions(blank)Set by Flow; do not map.

Outputs

OutputAPI nameTypeDirectionDescription
Selected Record IdvalueTextInput and outputSelected record Id (multi: the first). Map in to prefill, out to read the choice.
Selected LabelselectedLabelTextOutputDisplay text of the selected record (multi: comma-separated).
Selected RecordselectedRecordRecordOutputThe selected record (search: Id plus the fields shown). Multi: the first picked record.
Selected Record IdsselectedRecordIdsText collectionOutputMulti: all selected record Ids as a text collection.
Selected RecordsselectedRecordsRecord collectionOutputMulti: all selected records.
Is ClickedisClickedBooleanOutputTrue once the user picks a record, clears the selection or presses Continue on this screen. Not set by a prefilled value. Use it in a Decision after Next or in a screen condition (reactive).
Create New RequestedcreateNewRequestedBooleanOutputTrue when the user clicks Create new. Map this into a Decision after Next to open a create screen.
Create New Search TextcreateNewSearchTextTextOutputThe text in the search box when the user clicks Create new.

Shared behavior

Layout and width, required messages, colors, navigation, data sources, translations, accessibility, and the setup panel work the same way on every component. See NC screen components.

To copy this component's settings to another screen, use Copy settings at the top of its setup panel. See Copy settings.