Skip to content

Client file structure, pages, and data binding

Client keyword reference / Client file structure, pages, and data binding

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

Start with one read-only page that displays two known records. Add controls only after the correct projection data appears. DemoRequest, DemoRequestSet, and DemoRequestHandling below are fictional contracts you must expose in your training project; they are not standard IFS objects.

Prerequisites: a Developer Studio project matching the target release, an approved development component/layer, a deployed projection, and a test permission set. Follow naming and layering when extending existing source.

  1. Open the target .client model in Developer Studio. For an existing application, extend the supported layer instead of replacing Core.
  2. Match the projection header to the service containing the entity set. Keep the generated header conventions for your component.
  3. Confirm the service metadata exposes DemoRequestSet with type DemoRequest: RequestId (Text), Title (Text), Closed (Boolean), and EstimateHours (Number).
  4. Replace DEMO with your actual registered component. Save and build before adding UI elements.
client DemoRequest;
component DEMO;
layer Cust;
projection DemoRequestHandling;

A client chooses presentation. entityset, entity, attribute, reference, array, query, virtual, structure, action, and function definitions belong in the projection model where applicable. An entity-set declaration there could be entityset DemoRequestSet for DemoRequest;; it does not create the underlying business entity. Use the projection recipe for that separate development task.

  1. Define the reusable group against the type with for.
  2. Bind the page to the entity set with using.
  3. Add a selector and the group to that page. A declaration alone does not place a control on screen.
  4. Load two training records, select each, and confirm both ID and title change together.
page RequestDetails using DemoRequestSet {
label = "Training requests";
selector RequestSelector;
group RequestSummary;
}
selector RequestSelector for DemoRequest {
static RequestId;
static Title;
}
group RequestSummary for DemoRequest {
static RequestId;
field Title {
editable = [false];
}
field EstimateHours {
editable = [false];
}
}

If the selector is populated but the group is blank, compare the group’s type with the entity set’s type and inspect the selected record. Replacing for DemoRequest with for DemoRequestSet confuses type and collection.

Place this block at file scope, referencing the page above. Use unique entry names and your project’s agreed insertion position. at index orders a navigator entry; it is unrelated to a database index.

navigator {
entry RequestTrainingRoot toplevel at index 900 {
label = "Request training";
entry RequestDetailsEntry;
}
entry RequestDetailsEntry {
label = "Browse requests";
page RequestDetails;
}
}

Build and deploy the model, grant the projection/page through the normal permission workflow, and check the entry with the learner’s account. A missing navigator item is not proof that the page was not generated: inspect permission grants and merged navigator metadata.

For an external destination, a content entry can contain external "https://howtoifs.com/development/client-keywords/";. A lobby entry uses lobby "YOUR-EXISTING-LOBBY-GUID";; obtain the real lobby identifier and verify access. Do not invent a lobby { ... } page implementation in this file.

Add initcontext RequestLaunch; inside RequestDetails, then define the context at file scope:

initcontext RequestLaunch {
parameter Site Text;
init command {
execute {
if [Site != null] {
info("Opened for site ${Site}");
}
}
}
}

Within this context the parameter is Site; another control on the page reads initcontext.Site. Test opening the page without the parameter and changing the URL context while it is already open. Keep initialization repeatable: do not create business records merely because a page was opened or its URL changed.

Use the build and acceptance checklist before delivering a change.