Skip to main content
Nintex Community Menu Bar
Solved

Regular Filter in Smart Object


I would lke to apply a regular filter to SMO 'Task' to filter out data.

However, there are no reference on the web. Wild guess had got me stressed and still error was resulted.I do not know what text to type for the SMO 'Regular Filter'. (Attached) which includes:

1. ColumnName

2. Condition

3.Comparission

4.ParameterValue. 

 

My desire filter: A field called 'A' to equals to current user's name 'B'.

 

Anyone could help please? Thanks!


14630iBDEE4A157A9DDE6C.png
13289iCC058420E088C31A.png
13294iEFAC4342119A423F.png

Best answer by boringNerd1

Hi,


 


The 'Task' SmartObject is used in the Task List in your K2 Management page. To access it, go to your K2 Management page > Users > Task List. Now this brings me to my next point. You can enable SmartObject logging, play around with the filters you can use in the Task List, then check your SmartObject log (servicepackagein.log) to figure out what is the Regular Filter that is being passed in.


 


Here are 2 of the Regular Filter input that I have tested:


 


Filter #1 - Filter tasks from a particular workflow:


[{"ColumnName":"Process Full Name","Condition":"AND","Comparison":"LIKE","ParameterValue":"TestWorkflow"}]


 


Filter #2 - Filter tasks from a particular workflow, and assigned to a particular user:


[{"ColumnName":"Process Full Name","Condition":"AND","Comparison":"LIKE","ParameterValue":"TestWorkflow"},{"ColumnName":"Destination","Condition":"AND","Comparison":"LIKE","ParameterValue":"K2:denallixadministrator"}]


 


So to generate this Regular Filter output, you are already in the right direction. Execute the 'Regular Filter' SmartObject's Serialize methd. Fill in the values you want, and it should generate a string similar to the above.


 


However, the Serialize method only generates the string for 1 filter. If you have multiple filters, you have to use 'Serialize Add Item To Array' method. Fill in the properties except for Serialized Array, then execute. You should notice a string automatically being added into Serialized Array property. Change all your other values, then execute the method again. Each time you do that, it will keep adding more filters to the Serialized Array. Once you are done, you can copy the whole chunk of string from the results panel.


 


As for why you are getting that error, its because the Regular Filter input property is expecting an array, not an object. If you know your JSON, everything within the {} bracket is a single object. All the objects within an array is enclosed within a [] bracket. How to tell the input is expecting an array? Look at the type next to the name of the property. Regular Filter[].

View original
Translate
Did this topic help you find an answer to your question?

4 replies

Forum|alt.badge.img+15
  • 498 replies
  • Answer
  • March 13, 2018

Hi,


 


The 'Task' SmartObject is used in the Task List in your K2 Management page. To access it, go to your K2 Management page > Users > Task List. Now this brings me to my next point. You can enable SmartObject logging, play around with the filters you can use in the Task List, then check your SmartObject log (servicepackagein.log) to figure out what is the Regular Filter that is being passed in.


 


Here are 2 of the Regular Filter input that I have tested:


 


Filter #1 - Filter tasks from a particular workflow:


[{"ColumnName":"Process Full Name","Condition":"AND","Comparison":"LIKE","ParameterValue":"TestWorkflow"}]


 


Filter #2 - Filter tasks from a particular workflow, and assigned to a particular user:


[{"ColumnName":"Process Full Name","Condition":"AND","Comparison":"LIKE","ParameterValue":"TestWorkflow"},{"ColumnName":"Destination","Condition":"AND","Comparison":"LIKE","ParameterValue":"K2:denallixadministrator"}]


 


So to generate this Regular Filter output, you are already in the right direction. Execute the 'Regular Filter' SmartObject's Serialize methd. Fill in the values you want, and it should generate a string similar to the above.


 


However, the Serialize method only generates the string for 1 filter. If you have multiple filters, you have to use 'Serialize Add Item To Array' method. Fill in the properties except for Serialized Array, then execute. You should notice a string automatically being added into Serialized Array property. Change all your other values, then execute the method again. Each time you do that, it will keep adding more filters to the Serialized Array. Once you are done, you can copy the whole chunk of string from the results panel.


 


As for why you are getting that error, its because the Regular Filter input property is expecting an array, not an object. If you know your JSON, everything within the {} bracket is a single object. All the objects within an array is enclosed within a [] bracket. How to tell the input is expecting an array? Look at the type next to the name of the property. Regular Filter[].

Translate

  • Author
  • 2 replies
  • March 13, 2018

boringNerd 

Translate

Hello,

 

I am trying to filter based on ID and its fail for me "Task smart object"

 

[{"ColumnName":"Id","Condition":"AND","Comparison":"=","ParameterValue":"16107"}]

Translate

Forum|alt.badge.img+9
  • Apprentice
  • 105 replies
  • November 14, 2024

Use “EQUALS” Text instead of operator {"ColumnName":"Folio","Condition":"AND","Comparison":"EQUALS","ParameterValue":"310112324040000193"}

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings