I need to add ActiRelations in EditRelationsList.Oppo and I know that I have some SQL statements to execute in SQL Server. I'm trying to understand how the system tables work
Can you tell me if I am right or explain to myself:
SYSTABLES: Contains all existing tables in SQL Server. Efficy Designer uses it when the DB is "upgraded" (create/drop table)
SYSFIELDS: contains all the fields of each table (and virtual fields). Efficy Designer uses it when the database is "upgraded"
SYSRELATIONS: Efficy uses this to join different tables (and specify whether there is a join table)
SYSQUERIES: Efficy uses it to generate queries for obtaining data in Consult
SYSTABLEVIEWS: Efficy uses it to generate queries for obtaining data in Edit
SYSENTITYVIEWS: Contains collections of TABLESVIEWS to know which data to enter in which view
SYS_RELENTITIES: *I do not understand ??*
Sorry if I did not speak clearly but it's a little vague for me
I'm asking because I need to add ** ActiRelations ** to ** EditRelationsList.Oppo **.
I found a sample script that adds the OBJVPROF relationship with SQL statements. I'm trying to create my script from them.
But it contains the following SQL statement:
insert in SYSENTITYVIEWS (NAME, ISCUSTOM, TABLEVIEWS) values ('ObjvProf', 1, 'ObjvProf')
I looked for the relation Acti-Mail in this one and I can not find any entry ActiMail or MailActi
For the moment, my script looks like:
-- add Actions in OppoEdit
Update SYS_ENTITYVIEWS set ISCUSTOM=1, TABLEVIEWS=(SELECT TABLEVIEWS FROM SYS_ENTITYVIEWS WHERE NAME = 'OppoEdit') + ';Oppo_Acti=Acti' where NAME='OppoEdit'
-- Get Acti data from OppoEdit
insert into SYS_TABLEVIEWS (NAME, K_TABLE, ISCUSTOM, SELECTFROM, SELECTFIELDS, SELECTJOIN, SELECTORDERBY)
values ('Oppo_Acti', @K_TABLE, 1, 'ACTI_OPPO ACTI_OPPO, ACTIONS ACTIONS', 'ACTI_OPPO.*, ACTIONS.SUBJECT, ACTIONS.D_BEGIN, ACTIONS.DONE', 'ACTI_OPPO.K_ACTION = ACTIONS.K_ACTION', 'ACTIONS.D_BEGIN DESC, ACTIONS.SUBJECT');