- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2016 07:42 AM
I'm creating an application with mobile modules. Whenever I try to select the logged in user from the mobile module filter, it won't inject it any value. I've tried using both the dynamic filter and javascript:gs.getUserID(). Has anyone else experienced this issue and, if so, have you figured out how to get it to work? Thanks in advance for any input.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2016 08:10 AM
I have seen cases where nested functions can throw this error. To get around it, you can create a script include with a function that breaks up the code. Here is an example:
Then in your dynamic filter option, choose this script include in the Reference script field and then set your script to mobileGetID() in my example.
PS make sure client callable is checked, I often overlook that and it causes issues.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2016 07:51 AM
Try: javascript:gs.getUser().getID();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2016 07:59 AM
Good idea Brad. I'm not sure why I hadn't thought of it.
Unfortunately that doesn't work either. However, I do get a client-side error message stating: Illegal access to method getID() in class com.glide.sys.User. At least I have something to search for now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2016 08:10 AM
I have seen cases where nested functions can throw this error. To get around it, you can create a script include with a function that breaks up the code. Here is an example:
Then in your dynamic filter option, choose this script include in the Reference script field and then set your script to mobileGetID() in my example.
PS make sure client callable is checked, I often overlook that and it causes issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2016 08:24 AM
That worked! Thank you both very much.
Takeaway: Use script includes if 'javascript:' doesn't work in filters.
I haven't had a scenario where something simple wouldn't work. I typically resort to script includes only when there is a high level of complexity in the filter value (kind of like a sub select in SQL).