This topic is locked
[SOLVED]

 Hide record based on field value

8/8/2013 4:02:47 AM
PHPRunner General questions
A
andolo author

I am trying to hide records on the List page, based on field value. The field is named is_visble, and it has the value 1 for visible and 0 for hidden. I have tried the Before record processed event with this code:
return $data["is_visible"]!="1";

return true;
But it does not work. Anyone who has tried another solution? I am running PHP Runner ver 6.2.
/Anders

C
copper21 8/8/2013

Go to the List Page: Before Record processed and enter the code:
if($data["is_visible"] == 1)

{

return true;

}

else

{

return false;

}

A
andolo author 8/8/2013

Thanks!
It helped, now everything works as it should.
Anders



Go to the List Page: Before Record processed and enter the code:
if($data["is_visible"] == 1)

{

return true;

}

else

{

return false;

}

A
andolo author 8/8/2013

Ooops, just noticed a problem: I have both guests and admins viewing the list page (because certain buttons is only visible to admins). I just want to hide some records for the guests, but can they be made visible for the admins?
Anders

C
copper21 8/9/2013

I am not sure how you are doing login security, AD, static, or dynamic permissions, but if you can capture the session of the current users security group, you might be able to do something similar as above. Click the help button in PHP Runner and type in session and look at the examples.
Brian