Conditional data mapping in method execution

  • 4 May 2014
  • 1 reply
  • 5 views

Badge +2

Hi, I'm a newbie to K2. Just started working in a client project where the requirement is to have search form (customized search form) over the business data with multiple search fields.

Have created a form with two views over the same smartobject, 1) Item view 2) List view. Thought of achieving this requirement, by having the item view availble for the users to fill the filter conditions. On clicking a button (form control), it should invoke the Get List method of the List view (mapping the data from item view) and display the result whichever satisfies the filter conditions.

The problem I'm facing here is, if any of the field is left empty in the item view, then the search result is zero rows, as it is mapping empty value for the non-filled fields.

I just want to know, is there any way to do the conditional data mapping while calling the Get List method, so that if any of the field is not filled in item view, then that field will not be passed to the List method invokation.

 

Or any other best approach to fulfill this requirement ?

Thanks !


1 reply

Badge +6

Hi Parul,


 


You can try setting up rules that state if a certain field/control doesnt contain a value then the method will not pass the empty field into the list view which stores the search results. Please have look at the link below which discusses conditions and setting up rules which contain conditions.


 


Rule Designer-Conditions


 


HTH


 


Kind Regards,


 


Yannick


 


 


 


 

Reply