Doc,
Here's some steps which form one solution for you:
1) Add a hidden item to your page called: PX_SINGLE_MATCH_PERSON_ID
2) If the SQL for your query is currently something like:
SELECT person_id
, surname
, first_name
, city
, score(1)
FROM persons
WHERE contains(concat,:PX_SEARCH_STRING,1) > 0
Change it to be something like:
SELECT '<input type="hidden" id ="thePersonId" value="'||person_id||'">'||person_id
, surname
, first_name
, city
, score(1)
FROM persons
WHERE contains(concat,:PX_SEARCH_STRING,1) > 0
Essentially, we just need a HTML form item of some kind with a known ID to hold the primary key ID of the row returned so that in the next step we can reference it with javascript.
3) Add the following to the Region Footer of your Report Region:
<script language="javascript">
if (#ROWS_FETCHED# == 1) {
$x('PX_SINGLE_MATCH_PERSON_ID').value = $x('thePersonId').value;
doSubmit('SINGLE_MATCH_FOUND';}
</script>
4) Create a branch of type: Branch to Page or URL. Construct the URL it goes to (whatever your "Person Detail" page is. You can reference &PX_SINGLE_MATCH_ID. to set whatever item you need to on your "Person Detail" page). Make this branch conditional upon :REQUEST = 'SINGLE_MATCH_FOUND'
It's a method I've only just thought of and haven't fully tested it but I'm pretty sure it should work.
Hope that's of some help,
Andy