Referential Integrity

Hi,

Database apps are useful in kintone, particularly with lookup fields and related records. However, sometimes there’s a need for referential integrity. What’s the best way to go about adding this functionality in kintone?

Hello Brian!

As you may know, even if you use the lookup field to look up a different app’s field value, the value in the lookup field will not change correspondingly to the update of an original field value. This is because if a function to update the lookup field when the original field value is changed is implemented, it may slow down the kintone performance if there are too many processes to do so. Thus, kintone puts performance as a first priority so it does not have that kind of functionality, but you can still do so by using the API. The following is an example flow/process of how to do so:

  1. Use the “Get Records” API  to process toward App B when the value of App A is changed.
  2. Use the “Update Records” API to process toward App A of the related record.

Reference:
Kintone developer network – Get Record (GET)
https://developer.kintone.io/hc/en-us/articles/213149287/

Kintone developer network – Update Record (PUT)
https://developer.kintone.io/hc/en-us/articles/213149027/

 

Yuzo,

That makes sense. Thank you!