Applying a default value to a table filter that is based on reference field
I hope I am completely overthinking this and that there is an easy & obvious answer 
Use Case - When a page that contains a table loads, I need to be able to apply the "Current User Id" as the default filter value on a table (e.g. List Accounts Where Where OwnerId = $User.userId). The filter field needs to be searchable and provide an "All" options as well. In short, the records are filtered initially by the current user but the user can change the filter value and has visiblity to all "Users" in the system for searching as well as the "All" option.
Question - Is there a way to declaratively achieve this?
Things I've tried:
1) Looked for a way to apply a default value to an automatic table filter - No dice
2) Tried using a manual filter who's default condition value is the current UserId but model conditions with "Specific Value" don't apply merge syntax and treat the value as a string literal
3) Tried using a combination of conditions and models and the "Add Effect" feature of table filters to turn off/on different conditions but no dice
Am I overlooking a declaritive way to do this or is javascript the only answer?

Use Case - When a page that contains a table loads, I need to be able to apply the "Current User Id" as the default filter value on a table (e.g. List Accounts Where Where OwnerId = $User.userId). The filter field needs to be searchable and provide an "All" options as well. In short, the records are filtered initially by the current user but the user can change the filter value and has visiblity to all "Users" in the system for searching as well as the "All" option.
Question - Is there a way to declaratively achieve this?
Things I've tried:
1) Looked for a way to apply a default value to an automatic table filter - No dice
2) Tried using a manual filter who's default condition value is the current UserId but model conditions with "Specific Value" don't apply merge syntax and treat the value as a string literal
3) Tried using a combination of conditions and models and the "Add Effect" feature of table filters to turn off/on different conditions but no dice
Am I overlooking a declaritive way to do this or is javascript the only answer?
2
Categories
- 7.9K Questions
- 926 Ideas
- 220 Discussion Categories
- 178 General
- 9 Community Feedback
- 3 Community Info
- 18 Knowledge Base
Comments
Maybe I'm overthinking?
The challenge I'm having is getting the current User Id in to the condition on the Account model. You can't use specific value to do this but the table filter must be applied against a condition set to "Specific value."
Only thing I've come up with is a JS solution and while it works, doing something this trivial shouldn't require JS
Queue Up - Reusable comments plug - Vote here - https://community.skuid.com/skuid/topics/improve-re-usability-of-components-action-sequences-etc
My pages are so complicated that without "re-use" there's no way we'd get the app off the ground. For example, I need to show the same "field editor" in 3 different places on the same screen. The field editor is incredibly complex with search fields, filters, conditional rendering, etc. I've built a custom solution to "re-use" a component but it has limitations. Having this feature in the core product would be groundbreaking IMHO.
I don't know if this is ok for your use case, but you can add a tab and place your table inside of the tab. Then add a tab action when the tab is first shown to set your filter to the current user. This allows the user to change it from then on.
Thanks,
Bill
Very creative, love the idea! In my case, I ended up going with a JS based solution and it's working as needed. Still, seems to me like something that should be available without the need for JS and/or creative declaritive solutions such as the one you proposed.
I created a few posts to ask for these features. Feel free to vote if you agree