The Zurich release has arrived! Interested in new features and functionalities? Click here for more

FLOW Designer trigger condition with (Name-Value Pairs) field type .

siva mani kanta
Tera Expert

Hi All,

Need to create flow designer 

find_real_file.png

 

trigger condition when  test3 Vale !=  NO  

 

can any one please help me to set this.

1 ACCEPTED SOLUTION

Hitoshi Ozawa
Giga Sage
Giga Sage

Create a Update trigger on the table with Run Trigger set to "For every update".

Create an Action with Input of type "String".  Type "Name/Value" won't accept variable input so use "String" here. Name/Value will be a JSON object so will parse in the following Script Step.

Create a Script Step.

(function execute(inputs, outputs) {
  var pairs = inputs.pairs.toString(); // "pairs" is the name of the input variable of type "String"
  var jsonObj = JSON.parse(pairs);
  if (jsonObj.test3 != 'NO') {
    outputs.execute_flg = true;  // "execute_flg" is the name of the output variable of type "True/False"
  } else {
    outputs.execute_flg = false;
  }
})(inputs, outputs);

Add an If condition based on the result of calling Action.

find_real_file.png

View solution in original post

7 REPLIES 7

Hitoshi Ozawa
Giga Sage
Giga Sage

Create a Update trigger on the table with Run Trigger set to "For every update".

Create an Action with Input of type "String".  Type "Name/Value" won't accept variable input so use "String" here. Name/Value will be a JSON object so will parse in the following Script Step.

Create a Script Step.

(function execute(inputs, outputs) {
  var pairs = inputs.pairs.toString(); // "pairs" is the name of the input variable of type "String"
  var jsonObj = JSON.parse(pairs);
  if (jsonObj.test3 != 'NO') {
    outputs.execute_flg = true;  // "execute_flg" is the name of the output variable of type "True/False"
  } else {
    outputs.execute_flg = false;
  }
})(inputs, outputs);

Add an If condition based on the result of calling Action.

find_real_file.png

Hi Ozawa,

 

created one action with the details

find_real_file.png

find_real_file.png

after running i am getting this error;

find_real_file.png 

{
    "Action Status": {
        "code": 1,
        "message": "Error:  u,Detail: Unexpected token: u"
    }
}

I've wrote in my reply to set type to "String" and not to use type "Name/Values" because it does work.

find_real_file.png

replaced with String and getting same error

 

find_real_file.png