Page 1 of 1

Record toggle as view/no view at record level

Posted: 2018-01-17 15:55
by bdurfee
I am working on a project that contains a table with file downloads for anonymous viewers. At times, I want to be able to "turn off" one of the records so the anonymous visitors don't see it, but I don't want to remove the records from the database because I'll turn it on later. Is there a way to make records non-viewable at a record-level?

Re: Record toggle as view/no view at record level

Posted: 2018-01-23 10:09
by R Tammam
Hello bdufee,

yes , there is a way and here's my suggestion

1- add an extra field in the table you want to force this policy on it , this field will be boolean (0 or 1)
for example if the record accessible it will take value 1 and 0 other wise

2- then force a filter on this table through init hook function in table file in hooks folder

you can learn more about forcing filters in appgini through the following links

link for init function
http://bigprof.com/appgini/help/advance ... ename_init
link for Data list object
http://bigprof.com/appgini/help/advance ... ist-object

i hope it would help you

Regards,
Reham