Fill Dropdown With Values From Other App?

Is it possible to fill a dropdown in one app with valid values from another app? So that, when the user adds a new record to App 1, the selections in the dropdown are populated with values from another app? This would keep people form having to update the other app, then go back to the first app and edit the dropdown selections.

I would prefer a Lookup field to a dropdown, but this field needs to be populated via the API, and it looks like you can’t use the API to populate Lookup fields. Has that changed?

Hello James

You can do it by either of the following:

  1. App to Setup the Choices < Obtain - “Dropdown” Field

  2. App to Setup the Choices - Reflect > “Dropdown” Field

In the case of 1.

  1. Place a Text field
  2. Use the Record Create/Edit events to run the step 3 process and after that
  3. Hide the text field
  4. Use the GET record API to obtain records of an app that you set up the choices
  5. Using the data obtained in step 4), display your original dropdown field
  6. Using the record add/edit save submit event, reflect the value chosen in the original dropdown field to the text field

OR

In the case of 2.

  1. Using the GET record API or the kintone.app.record.get(), obtain records of an app that you set up the choices
  2. Based on the record obtained in step 1), create a request to change the choices of the “Drop-down” field
  3. Using the request in step 2), run the API that changes the field settings
  4. To reflect the changes made in step 3), run the API that applies the changes to the app environment.

Reference:
Kintone Developer Program - Kintone REST API List
https://developer.kintone.io/hc/en-us/articles/360008719854-Kintone-REST-API-List

I hope this helps

By the way, regarding the lookup field that you mentioned, if you are talking about using the add record “POST” to add the lookup field, it is possible to add it if you set up the data source map’s key field to “prohibit duplicate values.”