TRIRIGA

 View Only

 Question about Smart Section

HIROYA OGIHARA's profile image
HIROYA OGIHARA posted Wed July 23, 2025 05:15 AM
My name is Hiroya. I'm working on TRIRIGA project for the large Automotive company in Japan.
They are considering migration from the current real estate management system to TRIRIGA. We are in the design phase now.
That company will be the first TRIRIGA customer in Japan.
 
I have a question about which record is retrieved by the Smart Section.
I'd really appreciate it if you answer my question.
 
I understand Smart Section retrieves data from other BO (table in DB). On-line guide of TRIRIGA describes:
 
In TRIRIGA, a smart section retrieves data from a related record based on an association defined between the current record and the related record. 
 
In SQL's case, it retrieves data from other table by a very specific condition like "where tableA.orderID = tableB.orderID". 
However associations of TRIRIGA is kind of vague like "Has", "Belong To", and so forth. How can we retrieve data from other BOs by specific conditions like "where Current_BO.Field1 = Related_BO.Field1 using the associations?
 
Rishabh Agarwal's profile image
Rishabh Agarwal
Hi Hiroya, I assume you know the difference between Query Section Data & Smart Section Data but I am trying to explain it here.
We can retrieve the associated BO's record via both ways with the help of Associations, only the difference is Live link. We have Live link feature for Smart Section but not for Query Section. Live Link means if there is any modification on associated record then it will get reflected on primary BO record. Another difference is between Query Section and single record Smart Section is One to Many and One to One Mapping respectively. It means you can show many records in Query Section and single record in Single record Smart Section.
Now answer of your question is, yes you can retrieve the associated record via Query Section here based on your requirement.
 
Another way to achieve this is to create the Locator Field in the Current BO, in that way also you can retrieve the associated record with the help of current BO Field Filter and associations. Here you need to create a Tririga Query also.
One guidance is, you can create your own Association String as well as per your business required which can be more clear and specific instead of "Has", "Belong To".
If you want to know more then feel free to reach out to me.
Abhishek Singh's profile image
Abhishek Singh

You can utilize "IBS_SPEC_ASSIGNMENTS" table for your requirement ( if moule level association is not being used)

Mark Johnson's profile image
Mark Johnson IBM Champion

Associations are just strings that are used to help us understand the relationship between objects. There are forward and reverse associations. Whether the association is the forward or reverse is just a matter of perspective from the object you are working with. If you are trying to use SQL to join tables to get information then you would use either the module level association table, or the IBS_SPEC_ASSIGNMENTS Table. The IBS_SPEC_ASSIGNMENTS table contains every record level association that is defined in the system. It contains a simple lt contains a simple lookup of the from spec_id's of the two records and the association string that is used, the spec_template_id's of those records, which correspond to the BOs, and the spec_class_types of those records which correspond to the modules. So in SQL you would join from a T table (each BO has a corresponding T Table) to the IBS_SPEC_ASSIGNMENTS table on the spec_id and association to the corresponding T table of the related BO on its spec_id. However, if you do have a smart section you don't need to do this as the spec_id of the associated record is actually stored in the T table of the record. Since you already have it, you don't need to look it up. You could just join from the T table of the primary BO to the T table of the secondary BO where the secondary BO's spec_id is equal to the spec_id stored in the column for that smart section.

The database can be a bit confusing and it is not documented nor taught. I'm not sure if you are actually trying to understand how to do things in SQL, or are just trying to better understand associations. If you are just trying to better understand associations, I do have a video on youtube solely about associations.

HIROYA OGIHARA's profile image
HIROYA OGIHARA
Thank you, all.
 
I'm just trying to better understand associations. I have learned associations by watching the video ( https://www.youtube.com/watch?v=3RUJXPRTFSk&t=1293s ).
My study of TRIRIGA is still underway. So all the information you provided for me in this thread is very helpful.   

Thank you.

Todd Stewart's profile image
Todd Stewart

I suggest using the Report Manager to inspect existing queries or create your own.  For any query you can export the underlying SQL from the Advanced tab to see how it all works. The only caveat is it doesn't include Association filters, but you can see how it handles smart sections, look ups, etc.  

When building a Tririga query, the column tab shows columns for the selected BO on the left. If you scroll to the bottom there are additional sections for smart sections and lookup fields

Two BOs are not only associated by the association type string. It also uses the class types (module) and template ids (BO type) to differentiate between   "Lease -> has -> payment" and "Lease -> has -> journal entry"   

In some cases there are foreign keys  (smart sections / lookups) that link two records directly so the ibs_spec_assignments is not alway used.  You will see these in the SQL and they end in ObjId or SysKey

HIROYA OGIHARA's profile image
HIROYA OGIHARA

Todd, Thank you.

I really appreciate your suggestion.