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.
Layouts
| Layout | API value | What the user sees | Example |
|---|---|---|---|
| Auto | auto | Dropdown on a wide screen. Inline on a phone or in a narrow column. | Leave Auto and let a narrow column switch to inline. |
| Dropdown | dropdown | Results 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. |
| Inline | inline | Results show under the search box, as on phones and narrow columns. | A phone-width search. |
| Cards | cards | Results 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.
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.
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.
- Picks are stored in this browser only. They are not stored in Salesforce and do not follow the user to another browser or device.
- Only records that are still available show. With a records source, the record must still be in the collection. With a search source, records the user can no longer see are dropped.
- If the browser blocks storage, the list is simply empty. There is no error.
- Experience Cloud guests share one key on that browser. Turn the checkbox off on a shared or guest machine.
- Typing a search uses Minimum Characters as usual and does not add recent picks.
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:
- Create New Requested is set to true.
- Create New Search Text gets the text in the search box.
- The typed text stays in the search box.
- 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.
Add it to a screen
- Add NC Lookup to a screen. Set Label and Object, for example Contact. The Search picker style fills typical title, detail, and search fields.
- Optionally set filters, for example AccountId equals the current record, plus search fields and Required.
- Map Selected Record Id in and out of a text variable. Map Selected Record if you need more than the Id.
- To offer Create new, turn on Show Create New, add Next to the screen, and add a Decision on Create New Requested.
- 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.
- Match Mode is
contains(default) orstartswith. Startswith is faster on very large objects.
Validation
- Required blocks Next until a record is picked.
- For multi-select, Minimum Selections (default 0) and Maximum Selections (0 means no maximum) apply. A pick past the maximum is not added, and the message "Select at most N." shows on the component. If the incoming value already has more picks than the maximum, Next is blocked.
- In single-select, if the user typed text but did not pick a record, Next is blocked with a message to pick from the list.
- Disabled makes the field read-only, for example for a locked record that is already picked.
- Maximum Results is 1 to 50 per search, default 10.
Phone and desktop
- Auto shows a dropdown on wide screens and inline results on a phone or a column under 600 px.
- Cards keep results in the page on every width.
- 44 px touch targets at 600 px or less, on a phone, or on a touch screen.
- NC Lookup has no Alignment and no Tile Color. The Color Map style can be stripe, tint, or dot, but not fill.
Limits
- Create new only sets outputs and the typed text. The flow must create the record and reset Create New Requested.
- Recent picks are stored in the browser, not in Salesforce, and skip records the user cannot see.
- Search results are a flat list plus the Recently used section. There is no grouping.
Properties
| Property | API name | Default | Description |
|---|---|---|---|
| Style | stylePreset | (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. |
| Label | fieldLabel | (blank) | Field label shown above the search box. |
| Object | objectApiName | (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). |
| Required | required | false | Block Next until a record is selected. |
| Records | records | (blank) | Instead of a search, a record collection from the Flow, searched in the browser (no server call). |
| Data Source | source | auto | auto (default), search or records. Auto: Records set to records, else search. |
| Record Label Field | recordLabelField | (blank) | Field shown as the result title. Default: the object name field (Contact: the full Name). |
| Record Description Field | recordDescriptionField | (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 Fields | searchFields | (blank) | Comma-separated text fields to search. Blank: the title field (with a Style also text detail fields such as Email, up to 3). |
| Placeholder | placeholder | (blank) | Optional. Blank uses the translated default. |
| Help Text | helpText | (blank) | Optional hint under the label. |
| Label Format | labelFormat | (blank) | Optional template for the title, e.g. {Name} ({Code__c}). Plain text only. |
| Description Format | descriptionFormat | (blank) | Optional template for the second line, e.g. {Email} - {Phone}. |
| Match Mode | matchMode | contains | contains (default) or startswith. startswith is faster on very large objects. |
| Filter Field | filterField | (blank) | search, optional: field to filter on (one relationship hop allowed, e.g. Account.Type). |
| Filter Operator | filterOperator | eq | eq, ne, in, nin, like, gt, gte, lt or lte. |
| Filter Value | filterValue | (blank) | Value for Filter Field. Sent as a variable, never as query text. |
| Filter Logic | filterLogic | AND | AND (default) or OR: how the two filters combine. Blank or missing stays AND, so existing flows are unchanged. |
| Filter Field 2 | filterField2 | (blank) | Optional second filter, combined with the first using Filter Logic (default AND). |
| Filter Operator 2 | filterOperator2 | eq | Operator for Filter Field 2. |
| Filter Value 2 | filterValue2 | (blank) | Value for Filter Field 2. |
| Order By Field | orderBy | (blank) | search, optional: sort field. Default the record label field. |
| Sort Direction | sortDirection | asc | asc or desc. |
| Maximum Results | maxChoices | 10 | Results shown per search (1-50, default 10). |
| Minimum Characters | minChars | (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 Icon | iconName | (blank) | Optional SLDS icon in the empty search field. Default utility:search. |
| Object Icon | objectIconName | (blank) | Icon on results and the selection (SLDS Lookup), e.g. standard:account. Blank: the standard object icon, or standard:record. |
| Required Message | requiredMessage | (blank) | Optional. Blank uses the translated default. |
| Disabled | disabled | false | Read-only. |
| Layout | layout | auto | auto (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. |
| Density | density | comfortable | comfortable (default) or compact. Compact is 40px only on a wide component with a mouse; 600px or narrower, phones and touch screens keep 44px. |
| Accent Color | accentColor | (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 Color | backgroundColor | (blank) | Optional color behind the whole component. |
| Text Color | textColor | (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 Size | size | medium | small, medium (default), large or xlarge. |
| Corner Shape | shape | rounded | rounded (default), square or pill. |
| Color Map Field | colorField | (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 Map | colorMap | (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 Style | colorCue | stripe | stripe (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 Continue | stickyContinue | off | off (default) or auto (dock the Continue button to the bottom on phones when it is shown). |
| Empty Message | emptyMessage | (blank) | records source: optional text when no records are available. Blank uses the translated default. |
| No Match Message | noMatchMessage | (blank) | Optional text when a search has no matches. {0} is the typed text. Blank uses the translated default. |
| Selection Mode | selectionMode | single | single (default) or multi. Multi adds a pill for each picked record and keeps the search open for the next pick. |
| Minimum Selections | minSelections | 0 | Multi only. 0 = no minimum. |
| Maximum Selections | maxSelections | 0 | Multi only. 0 = no maximum. |
| Show Recently Used | showRecentlyUsed | true | When 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 Count | recentlyUsedMax | 5 | How many recent picks to show (1-20). Default 5. |
| Show Create New | showCreateNew | false | Add 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 Label | createNewLabel | (blank) | Optional. Blank uses + New {object label}. |
| Navigate After Selection | navigateOnSelect | none | none, 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 Button | showContinueButton | false | Show a button that navigates (Navigate After Selection) instead of moving on at once. Always shown for multi select when navigation is on. |
| Continue Button Label | continueLabel | (blank) | Optional. Blank uses Next, Previous, Finish or Pause (translated). |
| Available Actions | availableActions | (blank) | Set by Flow; do not map. |
Outputs
| Output | API name | Type | Direction | Description |
|---|---|---|---|---|
| Selected Record Id | value | Text | Input and output | Selected record Id (multi: the first). Map in to prefill, out to read the choice. |
| Selected Label | selectedLabel | Text | Output | Display text of the selected record (multi: comma-separated). |
| Selected Record | selectedRecord | Record | Output | The selected record (search: Id plus the fields shown). Multi: the first picked record. |
| Selected Record Ids | selectedRecordIds | Text collection | Output | Multi: all selected record Ids as a text collection. |
| Selected Records | selectedRecords | Record collection | Output | Multi: all selected records. |
| Is Clicked | isClicked | Boolean | Output | True 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 Requested | createNewRequested | Boolean | Output | True when the user clicks Create new. Map this into a Decision after Next to open a create screen. |
| Create New Search Text | createNewSearchText | Text | Output | The 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.