Hey everyone!
With the holiday season upon us, we want to share our upcoming working hours:
- New Year: Our team will be off on January 1st and 2nd. We’ll be back on Friday, January 3rd, to respond to any messages received during this time.
- Weekend: As usual, we don’t work on weekends, so January 4th and 5th will also be non-working days.
- Orthodox Christmas: Our office will be closed on Monday and Tuesday, January 6th and 7th for the holiday.
After that, we’ll return to our regular schedule and assist you as quickly as possible.
In the meantime, you can explore our documentation for Amelia and wpDataTables. You'll find tons of helpful resources, including articles and handy video tutorials on YouTube (Amelia's YouTube Channel and wpDataTables' YouTube Channel), which might just have the answers you need while we’re away.
Thanks a bunch for your understanding and support!
Warm regards and happy holidays!
TMS
In a similar way to editing someones own data limitation I'd like to know if there is a way I can filter the data by a custom user field.
As an example
My wordpress users have a company field, so we know which company each user works for.
In an SQL table we have a column for company name.
Can we set a restriction or filter in place so each user only sees there own companies data.
If user1,user2 and user 4 are working for Company A, they only need to see Company A data
Where as user3 works for company B they only need to see Company B data
If
Hi Dan,
Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.
-
At the moment, we do not have any dynamic Placeholder which can be used to look up the "User Role" for filtering or editing, so there is no easy built-in solution to filter the data like this as for your desired use-case.
As you know, for User ID, we do have a placeholder so our developers created that "limit what each user can see and edit" based on the unique User ID.
I will show you a custom SQL Query example with how you could try to filter a Table by User Role.
So you could use any Membership Plugin/ or "User role editor" to add Custom User Roles.
Then you can group your users, for everyone that works for Company A - to those users add additional Role for "Company A" , and so on.
Please be advised that this is just a custom example of using default WP user Roles, for your use-case you would need to modify our example.
Our Support does not cover writing or debugging Custom Queriers for our Users, but i hope it helps.
If I have this table:
This is a manual table which has manually entered IDs from wp_users and roles from wp_usermeta:
So, then I go to create an SQL query based table which will display entries based on user roles using this query:
When I'm logged in with user ID = 1, I see this:
When I'm logged in with user ID = 4, I see the same thing. And when I'm logged in as one of the subscribers, I can only see the rows where role = subscriber:
The only difference is that as subscriber I don't have access to back-end, so this confirms it is working on both front and back.
So, we're only left with hiding unnecessary columns, adding names, and so on.
Hope this helps.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi Dan,
Sorry, i just forgot to add, if you wish to see a Placeholder added in the future that can look up for the "Currently Logged in User Role" to be able to use it for filtering, you can make a development suggestion and our devs will do their best to work on it as soon as possible.
-
Please feel free to search on our suggestions page,
to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there, and as more people vote, the feature will move higher on the priority list.
You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;
and our newsletter, so you're informed about new features, bug fixes, freebies, etc.
-
Otherwise, for the time being you can only try with a custom SQL Query solution and using Custom User Roles as described.
Thank you.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables