This topic is locked
[SOLVED]

 PHP code snippet - get the value

11/16/2020 6:34:47 PM
PHPRunner General questions
G
gchowani author

Hi Guys!
May I kindly ask you how to get the field value on the "list page" from the data grid using "PHP code snippet" Please?

I am trying to make it without the success but believe this is possible.

I was trying many possibilities like:
echo $data["id"];

echo $record["id"];

echo $pcs_id_value;
$record = $pageObject->getCurrentRecord();

echo $record["id"];
and similar code.

Thank you in advance

Greg, PHPRunner 7

Sergey Kornilov admin 11/16/2020

PHP code snippet runs once on the page meaning that you can use it to access the current record. What you should do is to use 'View as' Custom for one of database fields where you can perform similar actions.

https://xlinesoft.com/phprunner/docs/view_as_settings_custom.htm
Also read this, it will help you understand the difference between code snippet, buttons and similar objects:

https://xlinesoft.com/blog/2011/04/28/taming-the-beast-events-buttons-and-code-snippets/

G
gchowani author 11/16/2020

THANK you Sergey!!
I will read these topics
Take care and have a GREAT day!!