Skip to content

Select one loaded record with Data Detail

Walkthrough · Intermediate · App Connect

Find one product by its id and handle a missing selection.

Find one product by its id and handle a missing selection.

  • An App Connect page with Data Traversal included. The in-app tour opens the prepared three-product example.

Add Data Detail with ID productDetail. Set Data Source to products.value, Key to id and numeric Value to 1. The supplied Variable holds three product records; in your project you can bind an existing Server Connect result array instead.

Bind a text label to productDetail.data.name. The initial record is Notebook. Data Detail returns one object, not an array; use an empty-state message when productDetail.data is null.

Add a button Click event using productDetail → Select and enter numeric Key 2. The action’s Key field takes the value to find; the component’s Key remains the field name id. In Preview, click Select id 2.

The label should now show Pencil. A string ‘2’ does not match numeric id 2 in this component. Convert query-string inputs deliberately before selection. Select missing id to test the no-match message.

Use the server when the record is not loaded

Section titled “Use the server when the record is not loaded”

Data Detail searches only its current collection. Use a server request for records outside it, and validate/authorize record ids again for any update or delete. Review the reference before using nested forms, because bound selection changes can reset them.

Selecting numeric id 2 shows Pencil; a missing id produces an empty selection.