最近の検索


最近の検索はありません

ZIS flow transform question - transform value to be Null



投稿日時:2023年11月01日

Hello, I have a use case where the ZIS flow goes into a certain state and then needs to change an already initialized value. I am having a hard time finding documentation on how to change a value using a transform action. Is this possible?

"modifyValue": {
       "Type": "Action",
        "ActionName": "zis:common:transform:Jq",
        "Parameters": {
           "data.$": "$.data",
            "expr": ' < expression to modify value to an empty string or Null >'
           },
            "ResultPath": "$.ChangedData",
            "Next": "nextAction"
 },

 

Thanks


0

1

1件のコメント

image avatar

Greg Katechis

Zendesk Developer Advocacy

Hi Craig! I'm thinking that you might be able to do this by using the `gsub` command, along with the appropriate regex. I haven't done much with ZIS myself, so I might be off on this, but something like this might do it for you (changes in bold):

"modifyValue": {
       "Type": "Action",
        "ActionName": "zis:common:transform:Jq",
        "Parameters": {
           "data.$": "$.data",
          "expr": '.something | jq 'gsub("^(?!\s*$).+"; "")''
           },
            "ResultPath": "$.ChangedData",
            "Next": "nextAction"
},

With the combination of ZIS and regex, I can't say for sure that this will work, but let me know how this goes for you!

0


サインインしてコメントを残してください。

お探しのものが見つかりませんか?

新規投稿