This topic is locked
[SOLVED]

 hide value in list view

12/19/2019 6:27:16 PM
PHPRunner General questions
M
mhollibush author

Is there a way to "mask" a value in the list view?
Issue:

Would like to mask the "price" of a item if the item was sold.
I have a column in the table that is either a 0 or a 1
I got it working in the view page using the event "Process Record Values"



if ($values["pupsold"]==1) {

if ($values["pupprice"]!="") $values["pupprice"]="Private";

}


Can I do this in the List view?

Sergey Kornilov admin 12/19/2019

If you use 'View as' Custom for this purpose it will be applied to all pages like List, View and Print.

https://xlinesoft.com/phprunner/docs/view_as_settings_custom.htm

M
mhollibush author 12/19/2019



If you use 'View as' Custom for this purpose it will be applied to all pages like List, View and Print.

https://xlinesoft.com/phprunner/docs/view_as_settings_custom.htm


Isn't custom view specific to the field you are editing?

I need the field to be masked based on another field's value.
Maybe I am looking at this the wrong way...

N
Nir Frumer 12/19/2019

hi

in the list page Before record Processed event

you can put
$data["pupprice"] = ( ($data["pupsold"]==1) ? "Private" : $data["pupprice"]);
if you need it on other pages you may repeat this operation
hope it helps,

M
mhollibush author 12/19/2019



hi

in the list page Before record Processed event

you can put
$data["pupprice"] = ( ($data["pupsold"]==1) ? "Private" : $data["pupprice"]);
if you need it on other pages you may repeat this operation
hope it helps,


THANK YOU!!!!!

That worked