Skip to content

LOVs, selectors, search context, and units

Client keyword reference / LOVs, selectors, search context, and units

IFS Cloud 26R1 · Documentation-based examples · Not compiled or executed in IFS.

Prepare two sites with deliberately overlapping codes. This exposes missing composite keys that a one-record demonstration would hide. Verify projection relationships and access before changing the lookup display.

  1. In the projection, map TeamRef(Site, TeamId) to DemoTeam(Site, TeamId) and expose DemoTeamSet.
  2. Define the selector below at client file scope.
  3. Insert the LOV into a DemoRequest group. Test choosing the same TeamId at two sites and inspect both stored keys.
selector TeamSelector for DemoTeam {
static Site;
static TeamId;
static TeamName;
}
// Inside a DemoRequest group:
lov TeamRef with TeamSelector using DemoTeamSet {
label = "Responsible team";
description = TeamRef.TeamName;
search = TeamId, TeamName;
required = [true];
}

Define a list TeamLookup for DemoTeam if users need extra columns, then add advancedview TeamLookup; inside the LOV. freeinput = [true]; permits a value outside the selection where supported; enable it only if the backend intentionally accepts that value. wildcard { key = "%"; description = "All teams"; } is appropriate for an agreed search contract, not an ordinary persisted foreign key. Test unknown and unauthorized teams separately.

Expose a projection structure RequestSearch with Boolean IncludeClosed and a function GetRequestSearchDefaults() returning that structure. Return false as the initial value.

searchcontext RequestSearchPanel for RequestSearch {
field IncludeClosed;
}
page RequestQueue {
label = "Request queue";
searchcontext RequestSearchPanel {
defaults = GetRequestSearchDefaults();
}
list RequestOverview using DemoRequestSet {
filter = [searchcontext.RequestSearchPanel.IncludeClosed = true
or Closed = false];
}
}

Open the page: only open requests should appear. Select IncludeClosed: both sets should appear. Reset and reopen; check the chosen default rather than assuming the last profile is cleared. Search context holds parameters, not business rows.

On a compatible data-bound page, startupmode = search; starts in search mode. defaultsearchfields = RequestId, Title; chooses prominent fields. pinnedsearchfields = RequestId; and requiredsearchfields = RequestId; serve different UI purposes. Use them only after verifying the fields are searchable. defaultfilter seeds an initial condition; neither it nor filter replaces server row security.

Expose numeric Budget/Weight, text CurrencyCode/UnitCode, and supported lookup sets DemoCurrencySet/DemoUnitSet. Supply selectors for those lookup types.

// Inside a group for the entity containing these attributes:
currency Budget(CurrencyCode) {
unitlookup DemoCurrencySet(CurrencyCode);
unitselector CurrencySelector;
uniteditable = [false];
}
measure Weight(UnitCode) {
unitlookup DemoUnitSet(UnitCode);
unitselector WeightUnitSelector;
unitrequired = [true];
}

These controls pair a value with its unit; they do not convert money or weight. Check 10 kg and 10 lb remain distinct values, and test null unit, rounding, and an unauthorized lookup value. If users can change currency, define the conversion/recalculation rule on the service rather than merely relabeling the number.

Expose an attribute SelectedSkillKeys in the representation supported by the target item-picker contract and a keyed DemoSkillSet with SkillName. Confirm key serialization against the installed model before storing selections.

itempicker SelectedSkillKeys using DemoSkillSet {
label = "Required skills";
displayvalue = SkillName;
availableitemslabel = "Available skills";
selecteditemslabel = "Chosen skills";
compactmode = [false];
enableordering = [true];
orderby = SkillName asc;
}

Select two skills, reorder them, save, and reload. Check that keys, not translated labels, are preserved. Remove all choices and verify the required/optional policy. Do not guess that the backing attribute is an arbitrary comma-separated string; check the real service contract.

Use the build and acceptance checklist before delivering a change.