Hi, I have A Join table between owners and autos - essentially, several "owners" can be linked to a single Auto with the JOIN Table. This gives them access to the AUTO's documents. However, I want them also to be able to change the Auto's Documents. It seems like the View Table has to be based on C_Auto in order to be able to CHANGE the auto data. (I have it set up on displaying the data on the JOIN table and accessing the Auto data but I can't get it to edit the Auto Record. ) Here are the tables.
C_Auto FILE,DRIVER('TOPSPEED'),OWNER('*****'),NAME(autoname),PRE(CAT),CREATE !A_AUTOS.TPS
OWNER_KEY KEY(CAT:Owner_GUID),DUP,NOCASE !TO FIND BY OWNER GUID
AUTO_GUID_KEY KEY(CAT:Guid),DUP,NOCASE !BY AUTO GUID
VIN_KEY KEY(CAT:VINnumber),NAME('CAUT_VIN_KEY'),NOCASE !VIN NUMBER
GUID_KEY KEY(CAT:Guid),PRIMARY,NAME('CAUT_GUIDKEY'),NOCASE
FK_ACCT KEY(CAT:Owner_GUID),DUP,NAME('CAUT_FK_ACCT'),NOCASE
fK_DEALER KEY(CAT:DEALR_GUID),DUP,NAME('CAUT_fK_DEALER'),NOCASE
record RECORD
Guid STRING('glo:st.MakeGuid()')
Owner_GUID STRING(16)
GROUP_GUID STRING(16) !If we want to group several cars under one OWNER, This is the link to the GROUP - get from A_GRPS and JOIN
DEALR_GUID STRING(16) !Dealership IHId
auto_name CSTRING(50) !auto description
auto_MFGR CSTRING(40) !manufacturer
.....
END
END
JN_AUTO FILE,DRIVER('TOPSPEED'),OWNER('****'),ENCRYPT,NAME(AUTOJOINNAME),PRE(HAJ),CREATE !Joins Autos with GUID of OWNER or GUID of DRIVER to accumulate list of drivers - so drivers can request service These people get Login rights
GUID_KEY KEY(HAJ:Guid),PRIMARY,NOCASE
FK_AUTO KEY(HAJ:AUTO_guid),DUP,NOCASE !guid link to auto
record RECORD
Guid STRING('glo:st.MakeGuid()')
AUTO_guid STRING(16) !GUID OF AUTOMOBILE
Owner_GUID STRING(16) !owner can be a driver
GROUP_GUID STRING(16) !If we want to group several cars under one OWNER, This is the link to the GROUP - get from A_GRPS and JOIN
DRIVER_GUID STRING(16) !This actually comes from A_OWNER as all folks have responsible account. Drivers of one car can be OWNERS OF ANOTHER CAR....
.....
END
END
JN_AUTO is Related Many:1 with HAJ:AUTO-guid --->> Cat:GUID So,one auto can have MULTIPLE DRIVERS (by Owner_GUID) linked to it.
What I want to do is use the JOIN Table to pick the AUTOs to display. ( Something like show AUTOS where selected autos are chosen based on the OWNER_GUID who is logged on.) I want to be able to CHANGE the C_AUTO record.
This is TPS database in Net Talk APP.
It appears that I need the VIEW to be from C_AUTO in order to be able to call the correct Update_C_Auto FORM.
So, what I am trying to do is set my view from C_Auto where only JN_AUTO records filtered by Owner_GUID is the same as the OWNER_LOGGED_ON_GUID.
I have not been able to set this up using the standard prompts.... is this something that I have to by manually setting the WHERE and file relationship? Seems like it would be easy in SQL but not so easy in TPS.
Looking for insight and help.
Thanks.
Ron