calcrelViewOptions = async (table, viewtemplate) => {
  const rel_field_view_options = {};
  for (const {
    relationTable,
    relationField,
  } of await table.get_relation_data()) {
    const { field_view_options } = calcfldViewOptions(
      await relationTable.getFields(),
      viewtemplate,
      true
    );
    for (const [k, v] of Object.entries(field_view_options)) {
      rel_field_view_options[
        `${relationTable.name}.${relationField.name}->${k}`
      ] = v;
    }
  }
  return rel_field_view_options;
}
create viewoptions (as_text, as_link, show, ...) for fields
with a foreign_key to 'table' from another table
@param table table of the viewtemplate
@param viewtemplate name of the viewtemplate
@returns an object assigning the path (table.foreign_key->field) to viewoptions