找文章 / 找答案
精选问答 更多内容

[常用脚本] 如何通过脚本获取组件选中值

Silvia青铜二 显示全部楼层 发表于 2022-10-25 11:59:00 |阅读模式 打印 上一主题 下一主题
1
已解决

最佳答案

社区管理员
yhdata_yzm 关注Ta

2022-10-25 11:59:01

param['p_products'】 = products
查看完整内容
回复

使用道具 举报

精彩评论3

yhdata_yzm 显示全部楼层 发表于 2022-10-25 11:59:01
瓜娃子 发表于 2022-10-25 14:10
我获取到选中值了,但是在数据集中是字符串,不能过滤
("Product_Name_EN" IN ( '"颜料红 25404","Cinip ...

param['p_products'】 = products
回复

使用道具 举报

yhdata_yzm 显示全部楼层 发表于 2022-10-25 13:13:39
你这个是树状参数还是树状过滤
回复

使用道具 举报

Silvia青铜二 显示全部楼层 发表于 2022-10-25 14:10:55
yhdata_yzm 发表于 2022-10-25 13:13
你这个是树状参数还是树状过滤

我获取到选中值了,但是在数据集中是字符串,不能过滤
("Product_Name_EN" IN ( '"颜料红 25404","Cinipol Red DR2P","Cinipol Red DR2PS","Cinipol Violet DV3P","Cinilex Orange GL","Cinilex DPP Red MT","Cinilex DPP Red MT-CF","Cinilex DPP Red TT","Cinipol Yellow DY5P","S Blue 104","S Black H3B","Cinilex DPP Orange SJ1C","Cinilex Orange JFC","颜料橙 7301","Cinilex Orange SJ3H","Cinipol Orange DJ3P","Cinipol Orange DJ1P","Cinipol Orange DJ2P","Cinilex Yellow SQY","Cinipol Red DR6P","Cinipol Red DR1P","Cinilex DPP Red SR1C","Cinilex DPP Red SR1CN","Cinilex Red RFL","Cinilex Red YNT","Klormax Red DR32","Klormax Red KC","颜料红 25401","Cinilex DPP Red SR1CD","Cinipol Red DR5P","Cinilex DPP Red SR2M","Cinilex DPP Red SR2P","Cinilex DPP Red SR2PD","Cinilex DPP Red SR2P-SC","Cinilex Red YNK","Klormax Red DR33","Klormax Red KP","颜料红 25402","颜料红 25409","Cinilex DPP Red SR2PL","Cinilex Red SR3C","Klormax Red KMA","Cinilex Red SR3C-CF","Cinilex Red SR3C-CR","Cinilex Red SR3C-SC","17702","Cinilex Red SR4C","Klormax Rubine KMQ","Cinilex Red SR4C-CF","Cinilex Red SR4F","Cinipol Red DR7P","Cinilex DPP Rubine SR5H","Cinilex DPP Rubine SR6T","颜料红 26402","Cinilex DPP Rubine SR6TS","Cinilex DPP Red SR9H","Cinilex DPP Red DMX","Cinilex DPP Red ST","Cinilex DPP Red ST(Press Cake)","Cinilex DPP Red YT-CF","颜料红 25403","Cinipol Violet DV4P","Cinipol Violet DV2P","Cinipol Violet DV1P","S Yellow 114","Cinipol Yellow DY1P","Cinipol Yellow DY6P","11001","Cinilex Yellow SY1H","Cinilex Yellow SY1H HS","Cinilex Yellow SY1HP","Cinilex Yellow SY1HQ","Cinilex Yellow SY2T","Cinilex Yellow SY2TN","13901","Cinilex Yellow SY3C","13902","Cinilex Yellow SY3CN","Cinilex Yellow SY3M","13903","Cinilex Yellow SY3P","S Yellow 5G","Cinipol Yellow DY3P","KLORMAX YELLOW YM04"'  ))

要在数据集中过滤脚本应该怎么写?
var productObejct = p_product.getSelectedObjects()
var products = []
var productsS= ''
if (productObejct.length > 0){
for (var i = 0; i< productObejct.length; i++){
   for (var j = 1; j<productObejct[i.length; j=j+2 ) {
      // products.push('"' + productObejct[i][j + '"')
       productsS +=  productObejct[i][j + ','
   }
}
  param['p_products' = productsS
}


回复

使用道具 举报

高级模式
您需要登录后才可以回帖 登录 | 免费注册

  • 官方微信

    欢迎关注永洪服务号!收费为0,价值无限

    扫码关注
  • 新浪微博

    让每位用户轻松挖掘数据价值!

    访问新浪微博
  • 智能客服
50W

会员等你来哦

Copyright   ©2012-2024  北京永洪商智科技有限公司  (京ICP备12050607) 京公网安备110110802011451号 |《永洪社区协议》
返回顶部