Hello
And thank you again for all your work!
Can anyone help me with this ? I have a table with 100 rows. And i want only last 5 rows to be showen for all groups that i grant access to view. And only the admin to see all rows.
Is that possible?
Thank you verry much!
Only 5 rows to show
Re: Only 5 rows to show
Hi,
short answer. Yes.
You can do this in the hooks/tablenmame.php --> init function by modifying the options->QueryWhere to your needs.
Also you should add a check to the dv function, if the user would try to call a direct record that he/she is not allowed to.
short answer. Yes.
You can do this in the hooks/tablenmame.php --> init function by modifying the options->QueryWhere to your needs.
Also you should add a check to the dv function, if the user would try to call a direct record that he/she is not allowed to.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Only 5 rows to show
Hello and thank you for the answer.
I can not see any QueryWhere in hooks/tablenmame.php (tablename is my table)
I need to insert new row?
Please can you guide me? I apriciate.
Thank you
I can not see any QueryWhere in hooks/tablenmame.php (tablename is my table)
I need to insert new row?
Please can you guide me? I apriciate.
Thank you
Re: Only 5 rows to show
Hi,
check out this page: https://bigprof.com/appgini/help/advanc ... ist-object
but, you will not find queywhere there either. You can use the code on the bottom of the page to see all data options available - and there you will see querywhere.
You should check (where pböthcer suggested) for the current user. If that is the admin - fine. If not, just define a querywhere. I would suggest something like adding " 1=1 LIMIT 5" (not tested)
Olaf
check out this page: https://bigprof.com/appgini/help/advanc ... ist-object
but, you will not find queywhere there either. You can use the code on the bottom of the page to see all data options available - and there you will see querywhere.
You should check (where pböthcer suggested) for the current user. If that is the admin - fine. If not, just define a querywhere. I would suggest something like adding " 1=1 LIMIT 5" (not tested)
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view