# Function get_inbound_self_relation_opts

- get_inbound_self_relation_opts(
  source: Table,
  viewname: string,
  ): Promise<{ path: string; views: View[] }[]>

  Get all relation options where source has a key to another table (refTable) and refTable has a key to source. Otherwise one could use a OneToOneShow from refTable.

  #### Parameters

  - source: Table
  - viewname: string

    name of the topview

  #### Returns Promise<{ path: string; views: View[] }[]>

  viewnames mapped to arrays of Inbound options

  - Defined in packages/saltcorn-data/plugin-helper.js:555