Mike Serfass
February 15th, 2023, 02:35
I'm attempting to add a new filter to the items list.
The comments in data_library.lua says
aCustomFilters = Optional. Table of custom filter table records
How do I pass that?
I'm setting other properties of the item record successfully. This works:
item_record_info = LibraryData.getRecordTypeInfo("item")
table.insert(item_record_info.aGMListButtons, "button_modification_list")
However, this does not:
table.insert(item_record_info.aCustomFilters, { ["Category"] = { sField = "catname" } })
I've tried every permutation of that line I can think of. It either fails to load with error message like
'}' expected near '='
with some random brace } 0 or ], and it doesn't matter where I put braces of any kind.
Or it loads the script but throws the same error when it runs
attempt to compare number with string
How do I declare
"Category"] = { sField = "catname" }
in
able.insert
Thanks
The comments in data_library.lua says
aCustomFilters = Optional. Table of custom filter table records
How do I pass that?
I'm setting other properties of the item record successfully. This works:
item_record_info = LibraryData.getRecordTypeInfo("item")
table.insert(item_record_info.aGMListButtons, "button_modification_list")
However, this does not:
table.insert(item_record_info.aCustomFilters, { ["Category"] = { sField = "catname" } })
I've tried every permutation of that line I can think of. It either fails to load with error message like
'}' expected near '='
with some random brace } 0 or ], and it doesn't matter where I put braces of any kind.
Or it loads the script but throws the same error when it runs
attempt to compare number with string
How do I declare
"Category"] = { sField = "catname" }
in
able.insert
Thanks