# Variable fieldviews

fieldviews: {
radio_select: {
description: string;
isEdit: boolean;
run: (
nm: string,
v: any,
attrs: GenObj,
cls: string,
reqd: boolean,
field: GenObj,
) => any;
type: string;
};
search_join_field: {
blockDisplay: boolean;
configFields: (
field: GenObj,
) => Promise<
{
attributes: { options: { label: string; value: string }[] };
label: string;
name: string;
required: boolean;
type: string;
}[],
>;
isEdit: boolean;
isFilter: boolean;
run: (
nm: string,
v: any,
attrs?: GenObj,
cls: string,
required: boolean,
field: GenObj,
state?: GenObj,
) => any;
type: string;
};
search_or_create: {
blockDisplay: boolean;
configFields: (
field: GenObj,
) => Promise<
(
| {
class?: undefined;
form_name: any;
input_type: string;
label: string;
name: string;
options: string[];
sublabel?: undefined;
type?: undefined;
}
| {
class: string;
form_name?: undefined;
input_type?: undefined;
label: string;
name: string;
options?: undefined;
sublabel: string;
type: string;
}
| {
class?: undefined;
form_name?: undefined;
input_type?: undefined;
label: string;
name: string;
options?: undefined;
sublabel?: undefined;
type: string;
}
)[],
>;
description: string;
isEdit: boolean;
run: (
nm: string,
v: any,
attrs: GenObj,
cls: string,
reqd: boolean,
field: GenObj,
row?: GenObj,
) => any;
type: string;
};
select: {
blockDisplay: boolean;
configFields: () => (
| {
attributes?: undefined;
class?: undefined;
help?: undefined;
label: string;
name: string;
sublabel: string;
type: string;
}
| {
attributes: { placeholder: string };
class?: undefined;
help: { topic: string };
label: string;
name: string;
sublabel: string;
type: string;
}
| {
attributes?: undefined;
class: string;
help?: undefined;
label: string;
name: string;
sublabel: string;
type: string;
}
| {
attributes?: undefined;
class?: undefined;
help?: undefined;
label: string;
name: string;
sublabel?: undefined;
type: string;
}
)[];
description: string;
isEdit: boolean;
run: (
nm: string,
v: any,
attrs: GenObj,
cls: string,
reqd: boolean,
field: GenObj,
) => any;
type: string;
};
select_by_code: {
blockDisplay: boolean;
configFields: (
field: GenObj,
) => {
attributes: { mode: string };
class: string;
input_type: string;
label: string;
name: string;
sublabel: string;
validator(s: string): any;
}[];
description: string;
isEdit: boolean;
run: (
nm: string,
v: any,
attrs: GenObj,
cls: string,
reqd: boolean,
field: GenObj,
) => any;
type: string;
fill_options(
field: GenObj,
force_allow_none: boolean,
where0: GenObj,
extraCtx: GenObj,
optionsQuery: any,
formFieldNames: string[],
user: any,
): Promise<void>;
};
select_by_view: {
blockDisplay: boolean;
configFields: (
field: GenObj,
modeetc?: GenObj,
) => Promise<
(
| {
attributes: { options: string[] };
help?: undefined;
label: string;
name: string;
required: boolean;
sublabel?: undefined;
type: string;
}
| {
attributes?: undefined;
help: { topic: string };
label: string;
name: string;
required?: undefined;
sublabel: string;
type: string;
}
| {
attributes: { options: string[] };
help?: undefined;
label: string;
name: string;
required: boolean;
sublabel: string;
type: string;
}
| {
attributes?: undefined;
help?: undefined;
label: string;
name: string;
required?: undefined;
sublabel?: undefined;
type: string;
}
)[],
>;
description: string;
isEdit: boolean;
run: (
nm: string,
v: any,
attrs: GenObj,
cls: string,
reqd: boolean,
field: GenObj,
) => any;
type: string;
fill_options(
field: GenObj,
force_allow_none: boolean,
where0: GenObj,
extraCtx: GenObj,
optionsQuery: any,
formFieldNames: string[],
user: any,
): Promise<void>;
};
select_from_table: {
blockDisplay: boolean;
configFields: (
fld: GenObj,
) => Promise<
(
| {
attributes: { options: string[] };
class?: undefined;
label: string;
name: string;
required: boolean;
sublabel?: undefined;
type: string;
}
| {
attributes?: undefined;
class?: undefined;
label: string;
name: string;
required?: undefined;
sublabel?: undefined;
type: string;
}
| {
attributes?: undefined;
class: string;
label: string;
name: string;
required?: undefined;
sublabel: string;
type: string;
}
| {
attributes?: undefined;
class?: undefined;
label: string;
name: string;
required?: undefined;
sublabel: string;
type: string;
}
)[],
>;
description: string;
isEdit: boolean;
run: (
nm: string,
v: any,
attrs: GenObj,
cls: string,
reqd: boolean,
field: GenObj,
) => any;
type: string;
fill_options(
field: GenObj,
force_allow_none: boolean,
where0: GenObj,
extraCtx: GenObj,
optionsQuery: any,
formFieldNames: string[],
): Promise<void>;
};
two_level_select: {
blockDisplay: boolean;
configFields: (
__namedParameters: { name: string; table: any },
) => Promise<
(
| {
input_type: string;
label: string;
name: string;
options: string[];
sublabel?: undefined;
type?: undefined;
}
| {
input_type?: undefined;
label: string;
name: string;
options?: undefined;
sublabel?: undefined;
type: string;
}
| {
input_type?: undefined;
label: string;
name: string;
options?: undefined;
sublabel: string;
type: string;
}
)[],
>;
description: string;
isEdit: boolean;
run: (
nm: string,
v: any,
attrs: GenObj,
cls: string,
reqd: boolean,
field: GenObj,
) => any;
type: string;
};
}

#### Type Declaration

- ##### `Namespace` radio_select: {
  description: string;
  isEdit: boolean;
  run: (
  nm: string,
  v: any,
  attrs: GenObj,
  cls: string,
  reqd: boolean,
  field: GenObj,
  ) => any;
  type: string;
  }

  radio_select namespace

- ##### search_join_field: {
  blockDisplay: boolean;
  configFields: (
  field: GenObj,
  ) => Promise<
  {
  attributes: { options: { label: string; value: string }[] };
  label: string;
  name: string;
  required: boolean;
  type: string;
  }[],
  >;
  isEdit: boolean;
  isFilter: boolean;
  run: (
  nm: string,
  v: any,
  attrs?: GenObj,
  cls: string,
  required: boolean,
  field: GenObj,
  state?: GenObj,
  ) => any;
  type: string;
  }

- ##### `Namespace` search_or_create: {
  blockDisplay: boolean;
  configFields: (
  field: GenObj,
  ) => Promise<
  (
  | {
  class?: undefined;
  form_name: any;
  input_type: string;
  label: string;
  name: string;
  options: string[];
  sublabel?: undefined;
  type?: undefined;
  }
  | {
  class: string;
  form_name?: undefined;
  input_type?: undefined;
  label: string;
  name: string;
  options?: undefined;
  sublabel: string;
  type: string;
  }
  | {
  class?: undefined;
  form_name?: undefined;
  input_type?: undefined;
  label: string;
  name: string;
  options?: undefined;
  sublabel?: undefined;
  type: string;
  }
  )[],
  >;
  description: string;
  isEdit: boolean;
  run: (
  nm: string,
  v: any,
  attrs: GenObj,
  cls: string,
  reqd: boolean,
  field: GenObj,
  row?: GenObj,
  ) => any;
  type: string;
  }

  select namespace

- ##### `Namespace` select: {
  blockDisplay: boolean;
  configFields: () => (
  | {
  attributes?: undefined;
  class?: undefined;
  help?: undefined;
  label: string;
  name: string;
  sublabel: string;
  type: string;
  }
  | {
  attributes: { placeholder: string };
  class?: undefined;
  help: { topic: string };
  label: string;
  name: string;
  sublabel: string;
  type: string;
  }
  | {
  attributes?: undefined;
  class: string;
  help?: undefined;
  label: string;
  name: string;
  sublabel: string;
  type: string;
  }
  | {
  attributes?: undefined;
  class?: undefined;
  help?: undefined;
  label: string;
  name: string;
  sublabel?: undefined;
  type: string;
  }
  )[];
  description: string;
  isEdit: boolean;
  run: (
  nm: string,
  v: any,
  attrs: GenObj,
  cls: string,
  reqd: boolean,
  field: GenObj,
  ) => any;
  type: string;
  }

  select namespace

- ##### select_by_code: {
  blockDisplay: boolean;
  configFields: (
  field: GenObj,
  ) => {
  attributes: { mode: string };
  class: string;
  input_type: string;
  label: string;
  name: string;
  sublabel: string;
  validator(s: string): any;
  }[];
  description: string;
  isEdit: boolean;
  run: (
  nm: string,
  v: any,
  attrs: GenObj,
  cls: string,
  reqd: boolean,
  field: GenObj,
  ) => any;
  type: string;
  fill_options(
  field: GenObj,
  force_allow_none: boolean,
  where0: GenObj,
  extraCtx: GenObj,
  optionsQuery: any,
  formFieldNames: string[],
  user: any,
  ): Promise<void>;
  }

- ##### select_by_view: {
  blockDisplay: boolean;
  configFields: (
  field: GenObj,
  modeetc?: GenObj,
  ) => Promise<
  (
  | {
  attributes: { options: string[] };
  help?: undefined;
  label: string;
  name: string;
  required: boolean;
  sublabel?: undefined;
  type: string;
  }
  | {
  attributes?: undefined;
  help: { topic: string };
  label: string;
  name: string;
  required?: undefined;
  sublabel: string;
  type: string;
  }
  | {
  attributes: { options: string[] };
  help?: undefined;
  label: string;
  name: string;
  required: boolean;
  sublabel: string;
  type: string;
  }
  | {
  attributes?: undefined;
  help?: undefined;
  label: string;
  name: string;
  required?: undefined;
  sublabel?: undefined;
  type: string;
  }
  )[],
  >;
  description: string;
  isEdit: boolean;
  run: (
  nm: string,
  v: any,
  attrs: GenObj,
  cls: string,
  reqd: boolean,
  field: GenObj,
  ) => any;
  type: string;
  fill_options(
  field: GenObj,
  force_allow_none: boolean,
  where0: GenObj,
  extraCtx: GenObj,
  optionsQuery: any,
  formFieldNames: string[],
  user: any,
  ): Promise<void>;
  }

- ##### `Namespace` select_from_table: {
  blockDisplay: boolean;
  configFields: (
  fld: GenObj,
  ) => Promise<
  (
  | {
  attributes: { options: string[] };
  class?: undefined;
  label: string;
  name: string;
  required: boolean;
  sublabel?: undefined;
  type: string;
  }
  | {
  attributes?: undefined;
  class?: undefined;
  label: string;
  name: string;
  required?: undefined;
  sublabel?: undefined;
  type: string;
  }
  | {
  attributes?: undefined;
  class: string;
  label: string;
  name: string;
  required?: undefined;
  sublabel: string;
  type: string;
  }
  | {
  attributes?: undefined;
  class?: undefined;
  label: string;
  name: string;
  required?: undefined;
  sublabel: string;
  type: string;
  }
  )[],
  >;
  description: string;
  isEdit: boolean;
  run: (
  nm: string,
  v: any,
  attrs: GenObj,
  cls: string,
  reqd: boolean,
  field: GenObj,
  ) => any;
  type: string;
  fill_options(
  field: GenObj,
  force_allow_none: boolean,
  where0: GenObj,
  extraCtx: GenObj,
  optionsQuery: any,
  formFieldNames: string[],
  ): Promise<void>;
  }

  select namespace

- ##### two_level_select: {
  blockDisplay: boolean;
  configFields: (
  __namedParameters: { name: string; table: any },
  ) => Promise<
  (
  | {
  input_type: string;
  label: string;
  name: string;
  options: string[];
  sublabel?: undefined;
  type?: undefined;
  }
  | {
  input_type?: undefined;
  label: string;
  name: string;
  options?: undefined;
  sublabel?: undefined;
  type: string;
  }
  | {
  input_type?: undefined;
  label: string;
  name: string;
  options?: undefined;
  sublabel: string;
  type: string;
  }
  )[],
  >;
  description: string;
  isEdit: boolean;
  run: (
  nm: string,
  v: any,
  attrs: GenObj,
  cls: string,
  reqd: boolean,
  field: GenObj,
  ) => any;
  type: string;
  }

- Defined in saltcorn-data/base-plugin/fieldviews.ts:917