This topic is locked
[SOLVED]

 Detail field as hyperlink?

2/8/2010 5:12:19 PM
PHPRunner General questions
mcebula author

I just downloaded the trial version today - an amazing product - I've been able to do so much so quickly <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=13756&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' />
Question - I'd like users to be able to copy links from email or Word documents for example and be taken to specific view record in my app. I can of course do it by copying the big long URL of a specific detail record view page but it would be nicer if I could attach it to a field name in the list page so it has meaningful anchor name that users can simply copy.
I've found the "view as" menu of a field inside the visual editor and can turn a field into hyperlink but can't find if there is a way to attach the dynamic URL of the current record.
Example - the view of an item has URL looks like this...

http://localhost/myapp/TABLE_view.php?editid1=Item

I'd like Item to be the anchor name in a link for a field in the list page so if user copies it they would taken to the the longer URL location.

Admin 2/8/2010

Mike,
I'm not 100% sure I understand but here it is.
Set 'View as' type of any field to 'Custom' and use the following code:

$value = "<a href=http://yourwebsite.com/myapp/TABLE_view.php?editid1=" . $data[keycolumn] . ">" . $value . "</a>";


Replace code in bold with actual URL and key column name.

mcebula author 2/9/2010

Yes I want to build the same URL that is exposed in the small magnifying glass icon for viewing an item from a list. It looks like I can construct the parts of the URL, thanks. Is the keycolumn in your example a variable of some kind? Can those be found by looking i the PHP code files.

Admin 2/9/2010

keycolumn is name of key column i.e. ID.