Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help with Portals

Status
Not open for further replies.

5835

Technical User
Jun 10, 2003
23
US
HI,
I have two databases ("Name" and "Visit"). In the name database, i have a portal for visit because each name can have multiple visits. the problem is, when i go to a new visit record, it picks up a new visit id but it doesnt pick up the name id of the current name record. the only way for this to work is if i type some information directly into the portal for example: entering a new date in the portal and with a button, and then open the visit database...OR... if i am in the visit database, i have to manually type the name id which is dificult to remember. is there any way I can open a new visit record and have the name ID populate automatically from the current (open) "name" record without going through the portal. Any suggestions would be greatly appreciated.
 
I think I understand your problem but do not understand why it is a problem. If your portal is using Name-ID as the key to the Visit file then creating a new portal row will create a new record in the Visit file with the correct Name-ID.


Cheers,
Paul J.
 
thank for the help paul,
this is what i have been doing and its not really a problem but a hassle and a new person who wants to use the program might not understand. our original goal was to use the portal to just view the data. I want to go to the visit database(entry form)directly from the name database. i can created a button(in NameDB) that will take me to the visit database, but it will not populate the patient id field. If i manually enter the name id, then everything works out but again, this is a hassle. could i make a script that will go to the visit database from the name database and take the name id so that certain fields populate automatically such as: first name, last name, DOB, etc.?
thanks once again
 
Presumably your button starts a script which executes a script in the Visits db?
Define a Global field in Patient, say g_RelNo and set it to 1
Define a Number field in Visit, say RelNo, with auto-enter 1.
Define a Global field in Visit, say g_PatientID
Define a relationship, say PatVis, from Patient to Visit -
g_RelNo::RelNo


Start your Patient script with
set field PatVis::g_PatientID, PatientID
then when you start your Visit script
new record
set field PatientID, g_PatientID
(You could use Copy and Paste but this is fraught with difficulties.)
I really do not understand why you want to switch to the Visit db. The whole idea of portals is that you have a view of your related file right in front of you so you do not need to switch. As soon as you enter a date, say, in the Visit portal, a Visit record is created with the PatientID and your lookups should populate the new record with whatever you want from ther Patient db (first name, DoB, etc.)





Cheers,
Paul J.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top