ok, i don't have time today to work on the other problem, but now have a different problem, more urgent!
i'm using build_external_select to build a select list from db2 when adding records to db1. it's working fine. i further refined it to display the name (2nd field) in the file while saving the key (1st field). now my problem: in html_record, i need to look up the value of the field in the external database to display the name (and some other fields) instead of the key that was saved in db1.
i tried creating a version of sub get_record and calling it in html_record_long, but cannot get it to work. i've looked at FAQ and can't find anything except the relational database mod. i don't want to switch to the other database; i just want to lookup something for display in a new variable (perhaps $rec2). i figure it isn't necessary to switch since the build_external_select works without switching. this is what i tried:
%rec2 = &switch_to_places($rec{'Placeservice'}); ... print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><p>Service:</p></TD>
<TD WIDTH="80%" VALIGN="TOP" ><p> $rec{'Dateservice'}<br> $rec{'Timeservice'}<br> $rec{'Placeservice'} $rec2[1]</p></TD></TR>
|;
i'm sure i'm not the first to do this. can you point me in the right direction? thanks!
i'm using build_external_select to build a select list from db2 when adding records to db1. it's working fine. i further refined it to display the name (2nd field) in the file while saving the key (1st field). now my problem: in html_record, i need to look up the value of the field in the external database to display the name (and some other fields) instead of the key that was saved in db1.
i tried creating a version of sub get_record and calling it in html_record_long, but cannot get it to work. i've looked at FAQ and can't find anything except the relational database mod. i don't want to switch to the other database; i just want to lookup something for display in a new variable (perhaps $rec2). i figure it isn't necessary to switch since the build_external_select works without switching. this is what i tried:
Code:
%rec2 = &switch_to_places($rec{'Placeservice'}); ... print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><p>Service:</p></TD>
<TD WIDTH="80%" VALIGN="TOP" ><p> $rec{'Dateservice'}<br> $rec{'Timeservice'}<br> $rec{'Placeservice'} $rec2[1]</p></TD></TR>
|;
i'm sure i'm not the first to do this. can you point me in the right direction? thanks!