英文:
filter on saved search suitescript
问题
我想在保存的搜索上设置一个筛选条件,即如果我按下复选框(复选框 == T),它将显示发票中的所有项目,前提是一个项目包含在项目中。例如,我选择了项目 A01,在目标发票上,即发票 INV 001 包含项目(A09、A08 和 A07),发票 INV 002(A01、A02 和 A03),那么结果将是 INV 002,其中包含所有项目(因为我们在筛选中选择了 A01)。
if (checkbox === true) {
if (itemId[0] != "") {
filter.push(
"AND",
["item", "anyof", "item"])
}
}
else {
if (itemId[0] != "") {
filter.push(
"AND",
["item", "anyof", itemId])
}
}
在这里,只有当复选框为 true 时,我才显示所有项目,并显示所有内容。如何正确拦截呢?
英文:
I want to make a filter on saved search with the condition that if I press the checkbox (checkbox == T) it will display all items in the invoice provided that one item is included in the item. for example I chose item A01, and on the target invoice, namely invoice INV 001 containing items (A09, A08, and A07) and invoice INV 002 (A01, A02, A03) then the result that will come out is INV 002 with all the items available (because we choose in filter A01)
if (checkbox === true) {
if (itemId[0] != "") {
filter.push(
"AND",
["item", "anyof", "item"])
}
}
else {
if (itemId[0] != "") {
filter.push(
"AND",
["item", "anyof", itemId])
}
}
here I only show all items if the checkbox is true, and displays everything. what is the appropriate way of intercepting?
答案1
得分: 1
筛选条件是 anylineitem
所以
filter.push('AND', ['anylineitem', 'is', itemId])
英文:
The filter for this is anylineitem
so
filter.push('AND', ['anylineitem', 'is', itemId])
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论