Creating view filters accessible by all users

  • 16 February 2021
  • 0 replies
  • 67 views

Userlevel 5
Badge +20
 

Creating View Filters accessible by all users

kbt134376

PRODUCT
K2 smartforms 4.7
BASED ON
K2 smartforms 4.7
This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Issue

After creating multiple filters in a view, the newly added filters are not visible for other users; other than the user who added them.

Symptoms

Filters are not behaving as expected. The filters cannot be seen by other users, other than the designing user.

Resolution

From a list view perspective you have two options when it comes to setting up filters:

 

  1. The first is to set up a filter on the view itself during the view edit mode, this means that this filter will be applied to all users. However, this also means that the filter will be executed with the view when it is initialized and you will not be able to turn it off during runtime.  (The only way to turn it off is to remove the filter).
  2. The second option is to add a filter to the view during runtime. This filter is user specific which means that only the user who set it up will be able to use this filter and it can be turned on and off during runtime.


The requirement is that certain parts of the two filter options need to be combined in order to have all users able to use the filter, but it still needs to be toggleable (be able to turn it on or off).

 

It is recommended you do the following:

 

  1. On the view, add a drop-down control. In the control data source give it static values. (These values will be the filter names). Make a note of the values that you add for each item by noting the 'Value' you give to the filter name 'Display,' as you will use the Value later on in a few rules.
     
  2. Set the drop-down controls width to 20% (you can change this to the desired size).
     
  3. On the drop-down add a rule which should look similar like this:
  • When Drop-Down List is Changed
  • if Drop-Down List contains [First Value used In Step 1]
  • then execute the Get List method (configure)
  • if Drop-Down List contains [Second Value used In Step 1]
  • then execute the Get List method (configure)
  • if Drop-Down List contains [Third Value used In Step 1]
  • then execute the Get List method (configure)
  • if Drop-Down List contains [Fourth Value used In Step 1]
  • then execute the Get List method (configure) etc.

 

4. Now in the (configure) section for the rule "then execute the Get List method" you will add the filter that you want

 

5. After doing the above you successfully created your own filter which is part of the form or view, which means all users will have access to use it.


0 replies

Be the first to reply!

Reply