How to add 70 conditons in filter

NS16
Mega Sage

Hi Experts,

 

Requirement- 

On user table there is two fields

1) String field

2) Reference location field

Now if String field contains "test" then update "abc" location in the Reference location field.

Now there is 10K user records, for each I have to update Reference location field.

 

And we dont want update each user record on each time flow runs(flow runs daily).

 

So for that I am trying to add below 70 conditions in the flow

1) String field contains "test" and Reference location field is not "abc"

OR

2) String field contains "test1" and Reference location field is not "abc1"

OR 

2) String field contains "test2" and Reference location field is not "abc2"

so on

 

But the main issue is we due to filter limit I am not able to add all 70 condtions in the flow

 

How can we achieve this requirement.

 

Any help would be appreciated

 

Many thanks

NS

1 ACCEPTED SOLUTION

NS16
Mega Sage

Hi Experts,

I figure out the solution.

I have created a decision table and add all my conditions in that in input and result format.

Then I called that table in BR with below script and it worked

 

var dt = new sn_dt.DecisionTableAPI();
    var inputs = new Object();
    inputs['test'] = current.getValue('abc');
    var response = dt.getDecision("sys_id of decision table", inputs); 
    if (response != null) {
        current.setValue('abc', response.result_elements.test.toString());
    }

 

 

View solution in original post

4 REPLIES 4

piyushsain
Tera Guru
Tera Guru

You can use Dynamic filters or you can create a script include and use it to update the records. Using a script for doing this would be the best option

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,
Piyush Sain

Tai Vu
Kilo Patron
Kilo Patron

Hi @NS16 ,

Let try this feature!

Decision Builder 

You can convert 70 steps into 1 in the flow designer.

 

Let me know if it works for you

 

 

Cheers,

Tai Vu

Yes I know about this feature, but can I use this feature in Look records activity to add conditions.

NS16
Mega Sage

Hi Experts,

I figure out the solution.

I have created a decision table and add all my conditions in that in input and result format.

Then I called that table in BR with below script and it worked

 

var dt = new sn_dt.DecisionTableAPI();
    var inputs = new Object();
    inputs['test'] = current.getValue('abc');
    var response = dt.getDecision("sys_id of decision table", inputs); 
    if (response != null) {
        current.setValue('abc', response.result_elements.test.toString());
    }