This topic is locked

Links on List Page

3/17/2014 4:27:54 PM
PHPRunner General questions
I
ISelb author

I would like my list page to have its elements link to that elements' page.
Example: Two tables

Votes

  • vote_id
  • candidate1_id
  • candidate2_id
  • cvandidate3_id
    Candidate
  • candidate_id
  • candidate_name
  • candidate_age
    When I show the Votes_list page, I would like the following displayed (repeated for however many votes there are):

    VoteID - candidate1_name - candidate2_name - candidate3_name
    Then each candidate name listed will be a link to that candidate table, and it would display (only one row of that candidate):

    CandidateID - Name - Age
    It seems like it should be straightforward, but I haven't been able to get it to work.
    Assistance, is most appreciated.

Sergey Kornilov admin 3/18/2014

This is definitely possible though some custom coding will be required. I would setup all three fields (candidate1_id, candidate2_id, candidate3_id) as 'View as' Custom. In your code make those fields hyperlinks pointing to corresponding View page of Candidate table.
You also might need to display candidate name instead of id. You can either modify SQL query joining Candidate table and pulling names from there or by performing a separate SQL query in 'View as' Custom code to do the same job. the first approach is preferred from performance point of view.