Record toggle as view/no view at record level

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
bdurfee
Veteran Member
Posts: 32
Joined: 2013-02-07 17:44

Record toggle as view/no view at record level

Post by bdurfee » 2018-01-17 15:55

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?

R Tammam
Veteran Member
Posts: 113
Joined: 2017-08-26 15:35

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

Post by R Tammam » 2018-01-23 10:09

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

Post Reply