Hi everyone,
I’m trying to use Company as a Table MultiSelect field in my custom DocType. However, when I submit the form, I get the following error:
pgsql
raise FrappeTypeError(
frappe.exceptions.FrappeTypeError: Argument 'company' should be of type 'typing.Optional[str]' but got 'list' instead.
It seems like the system is expecting a single string value, but the MultiSelect is returning a list.
How should I structure the field or handle the data so that this works correctly?
Is there a recommended way to use link fields like Company in a Table MultiSelect context?
Any guidance would be appreciated!
Thanks!
please check the docs for Table MultiSelect, i’m not too sure about a ready solution but it requires a child table with at least one Link field
Hi
The Extract from Frappe Doc may help as following;
Step 1: Create a child DocType.
Create a new DocType, enable ‘Is Child Table’ and ‘Editable Grid’ check-boxes and add a field with ‘Link’ type.
Set the link field as mandatory. Ensure that the field within the child table has “In List View” ticked.
https://docs.frappe.io/erpnext/user/manual/en/table-multiselect-field
When I follow the exact steps — creating a child DocType with Is Child Table
, Editable Grid
, and a mandatory Link
field (with “In List View” checked) — it works fine for most Link fields.
However, it doesn’t work when the Link field is set to “Company”. It throws an error, even though everything is set up correctly and works for other doctypes.
When I follow the exact steps — creating a child DocType with Is Child Table
, Editable Grid
, and a mandatory Link
field (with “In List View” checked) — it works fine for most Link fields.
However, it doesn’t work when the Link field is set to “Company”. It throws an error, even though everything is set up correctly and works for other doctypes.
doesn’t work when the Link field is set to “Company”
IMO it shouldn’t be a problem.
Could you please share the version you are on?