View rule script is working only on "default" view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-03-2016 02:48 AM
Hi all,
we implemented View rule with script (we are running Helsinki) for sc_req_item table.
But we realized, the view rule is working only on "default" view. So in case sc_req_item table is using view "mobile", the View rule does not apply.
It does not make sense for me. Is it a bug or "feature". Why is scripted View rule working only on "default" views? This is totally unuseful...
Or did we miss something? There is almost nothing in official documentation about View rule script.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-03-2016 02:55 AM
Not a great question but is the advanced checkbox selected for the view rule that you are facing the issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-03-2016 02:58 AM
yes of course, otherwise I'm not able to write the script

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-03-2016 03:02 AM
I haven't used much view rule scripting before but can you share the script that you are using? I/someone can help you better if the script is posted.
Also, is the view to be used set to 'answer' variable in the script? Is 'Overrides user preference' true?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-03-2016 03:10 AM
The script is pretty. Simple. I'm trying to insert a log to see if the script is evaluated:
(function overrideView(view, is_list) {
gs.log('PETER TEST', 'Peter');
// Add your code here
answer = null; // set the new view to answer
})(view, is_list);
and yes, 'Overrides user preference' is set to true