Select one loaded record with Data Detail
Find one product by its id and handle a missing selection.
Find one product by its id and handle a missing selection.
Before you begin
Section titled “Before you begin”- An App Connect page with Data Traversal included. The in-app tour opens the prepared three-product example.
Bind the loaded collection
Section titled “Bind the loaded collection”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.
Show the selected object
Section titled “Show the selected object”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.
Select a different key value
Section titled “Select a different key value”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.
Verify Pencil and the id type
Section titled “Verify Pencil and the id type”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.
Check your result
Section titled “Check your result”Selecting numeric id 2 shows Pencil; a missing id produces an empty selection.