# The system name that uniquely identifies the jig
title: View Customer
# The jig type used to display data
type: jig.default
# The type of datasource used to return data in the jig
datasources:
customerInfo:
type: datasource.sqlite
options:
# The data provider being used. In this case, the Jigx Dynamic Data provider, which is a built-in database that can be queried to get data from
provider: DATA_PROVIDER_DYNAMIC
# The name of the table that the information is being returned from. All Dynamic Data-based tables are saved in the "default" database
entities:
- default/customers
# The SQLite query used to specifiy the data to return
query: SELECT id, '$.firstName', '$.lastName', '$.email' FROM [default/customers] WHERE id = @custId
queryParameters:
custId: =@ctx.jig.inputs.custId
isDocument: true
# The controls that will be displayed on the jig are defined under the children node on a default jig
children:
# All input controls are placed on a form component
- type: component.entity
options:
children:
# To display two controls next to each other, they are added as children of a field-row component
- type: component.field-row
options:
children:
# A text-field component is used to display text information on a form
- type: component.entity-field
options:
label: First Name
value: =@ctx.datasources.customerInfo.firstName
- type: component.entity-field
options:
label: Last Name
value: =@ctx.datasources.customerInfo.lastName
- type: component.entity-field
options:
label: Email
value: =@ctx.datasources.customerInfo.email
# The top level action on a default jig places a button at the bottom of the screen
actions:
- children:
# The navigation action that is performed when the go-to action completes
- type: action.go-to
options:
title: Edit Customer
linkTo: edit-customer
parameters:
custId: =@ctx.jig.inputs.custId