微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何在 Podio Globi webhook 中获取多选类别的 ID?

如何解决如何在 Podio Globi webhook 中获取多选类别的 ID?

我在跑道上将 Webhook 设置为多选字段。

我当前的代码使用此类别字段的“文本 X Y Z J”,效果很好。

如何将“X Y Z J”更改为类别 ID:1 2 3 4 ?

文本 X = ID 1,文本 Y = ID 2,文本 Z = ID 3,文本 J = ID 4。

附上沙箱信息。

提前致谢。

当前代码

foo();
function foo(){
$result='';
if ([(WebHook) fields::5::value::0]=="o1") {
  if ($result=='') {$result="X";}
  else {$result=$result.','."X";}
}
if ([(WebHook) fields::5::value::0]=="o2") {
  if ($result=='') {$result="Y";}
  else {$result=$result.','."Y";}
}
if ([(WebHook) fields::5::value::1]=="o3") {
  if ($result=='') {$result="Z";}
  else {$result=$result.','."Z";}
}
if ([(WebHook) fields::5::value::1]=="o4") {
  if ($result=='') {$result="J";}
  else {$result=$result.','."J";}
}
return $result;
}

沙盒中的信息

{
      "status": "active","type": "category","field_id": 218404051,"label": "Category5B multi","values": [
        {
          "value": {
            "status": "active","text": "Y","id": 2,"color": "DCEBD8"
          }
        },{
          "value": {
            "status": "active","text": "Z","id": 3,"text": "X","id": 1,"text": "J","id": 4,"color": "DCEBD8"
          }
        }
      ],

enter image description here

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。