Configure a table to use a dropdown

This example shows how to configure an app where the user can:

Suppliers app

To start:

  1. Select My Apps from the Extension Kit portal main menu.
  2. Select the Create new app button and name your app.
  3. Select the Create button.

Create an app

Configure the app layout

IMPORTANT: The components and resources have dependencies between them. To configure this app, you must go from the Canvas tab to the Resources tab and the Logic flow tab frequently.

Resources

Go to the Canvas tab:

Note: Use the Layout view switch and the Layer panel to help you.

App in canvas

Configure the Text component

In this example we configure the component as follows:

Note: The Divider component requires no configuration.

Go to the Resources tab next to canvas:

After setting our UI, let's configure our resources to retrieve data:

Create the Suppliers resource

To configure the resource, follow these steps:

  1. Select the Plus (+) button on top of the left panel to create a new resource.
  2. Select the new resource on the left panel.
  3. Select the Pencil icon to change the name to 'Suppliers'.
  4. Select ERPx API from the Type menu on the right and configure:

    1. Configuration section: - API endpoint: Open the dropdown and select objects/suppliers - Method: Open the dropdown and select GET.

    2. Parameters section: - orderBy: Enter the text: supplierName.

Go to the Logic flow tab next to resources:

To trigger the resource when the app is launched, follow these steps:

  1. Drag the On launch event to the viewport.
  2. Drag the HTTP Request action to the viewport and connect it to the On launch event.
  3. Select HTTP Request action in the viewport to see the properties panel to the right.
  4. Open the HTTP dropdown.
  5. Select the resource, for this example Suppliers (res1).

    Logic flow

Go back to the Resources tab:

Create the Languages resource

To configure the resource, follow these steps:

  1. Select the Plus (+) button on top of the left panel to create a new resource.
  2. Select the new resource on the left panel.
  3. Select the Pencil icon to change the name to 'Languages'.
  4. Select ERPx API from the Type menu on the right and configure:

    1. Configuration section:

      • API endpoint: Open the dropdown and select objects/languages
      • Method: Open the dropdown and select GET.

Go to the Logic flow tab next to resources:

To trigger the resource when the app is launched, follow these steps:

  1. Drag the HTTP Request action to the viewport and connect it to the On launch event.
  2. Select HTTP Request action in the viewport to see the properties panel to the right.
  3. Open the HTTP dropdown.
  4. Select the resource, for this example Languages (res2).

    Logic flow

In the following image you can see the Resource tab with all the resources configured.

Resources

Go back to the Canvas tab:

Now, we need to finish configuring our components.

Configure the Table component

In this example we configure the component as follows:

Note: See Table component for more details.

You can see the final result in the following image:

App in canvas

Note: See Components and events and actions for more details.

Finally, after configuring the components and the resources, select the Save draft button and preview your app.