# Function calcrelViewOptions

- calcrelViewOptions(table: any, viewtemplate: any): Promise<{}>

  create viewoptions (as_text, as_link, show, ...) for fields with a foreign_key to 'table' from another table

  #### Parameters

  - table: any

    table of the viewtemplate

  - viewtemplate: any

    name of the viewtemplate

  #### Returns Promise<{}>

  an object assigning the path (table.foreign_key->field) to viewoptions

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