This topic is locked
[SOLVED]

 How to covert a listed field to a hyperlink

6/8/2011 12:22:25 AM
PHPRunner General questions
bbarker author

I searched and searched for this solution -- really!! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=17163&image=1&table=forumtopics' class='bbc_emoticon' alt=':huh:' />
I have Two tables:

  1. vendor_list (Master Table)
  2. vendordisplay_list (View of Master Table)
    When I call vendordisplay_list it displays 50 records (3 fields):

    VendorID(1), Name, City

    VendorID(2), Name, City

    VendorID(3), Name, City

    etc
    What I am trying to do is _make the VendorID field a "hot" hyper-link_that points to the _master table "vendorlist.php" for the highlighted record (which would display the entire record, if selected). So each of the 50 lines would have a unique hyperlink.
    I have added the "search" info to "vendor_list.php" and it "almost" works. What do I replace the sample (18525) with in order to match the VendorID_value of the specific record.



{BEGIN VendorID_fieldcolumn}<TD class=borderbody vAlign=middle {$VendorID_style}>



<a href="http://localhost//Database/tblvendors_list.php?a=integrated&ctlSearchFor=18525&simpleSrchFieldsComboOpt=VendorID&simpleSrchTypeComboNot=&simpleSrchTypeComboOpt=Equals>{$VendorID_value}</a>;
</TD>{END VendorID_fieldcolumn}

Sergey Kornilov admin 6/8/2011

The easiest way to achieve this is to set 'View as' type of this field to 'Custom'. In this case you can add your own logic there and display field as a hyperlink if required.

bbarker author 6/8/2011

Thanks.
I've been trying that - inserting into the Custom Field.
I'm having trouble replacing the record number "23456" in this code to the variable for "VendorID".
<a href="http://localhost/database/tblvendors_list.php?a=integrated&;

ctlSearchFor=23456&

simpleSrchFieldsComboOpt=VendorID&

simpleSrchTypeComboNot=&

simpleSrchTypeComboOpt=Equals

">{$VendorID_value};

Sergey Kornilov admin 6/8/2011

According to the manual you can access the value of any field as $data["FieldName"]
http://xlinesoft.com/phprunner/docs/_view_as__settings_custom.htm

bbarker author 6/9/2011

Arghhhhhh!!!!!!!
I learned something today. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=58781&image=1&table=forumreplies' class='bbc_emoticon' alt=':o' />
I always use the PDF version of the PHP Runner Manual, since it downloads the entire text AND is fully searchable!!! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=58781&image=2&table=forumreplies' class='bbc_emoticon' alt=':lol:' />
But your example sent me back to the HTML version of the manual. In comparing the same page, I can see that the HTML sections have more information in them!!!! And it was clear to me what to do as soon as I saw the examples in it. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=58781&image=3&table=forumreplies' class='bbc_emoticon' alt=':blink:' />
Goodbye PDF Manual. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=58781&image=4&table=forumreplies' class='bbc_emoticon' alt=':angry:' />

Sergey Kornilov admin 6/9/2011

PDF version of the manual has exactly the same content. 'View as' Custom topic in PDF provide all six examples you can see in online version.