BO1: attributes IndName and IndId. BO2: attributes Line, IndId and shortcut IndName. So the IndID should be the same in both, and I want to show the name by querying BO2. Read all the documetation and watched the videos, still need help..
![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
These two BOs represent 2 tables on my server, where one of them contains the lineNumbers and the belonging indicatiorID, and the other contains the indicatorID and the indicatorName. With a sql statement I would use a join to get a table with the LineNumbers, indicatorID ang IndicatorName. I figured then that I could show the indicatorName belonging to the indicatorID as a shortcut, if I made a reference to the BO first. I followed the relationship video and the shortcut video, and tried to make the reference and shortcut as shown. So the IndicatorID is needed to get the correct indicatorName. Does that make sense?joben wrote: ↑Fri Feb 09, 2024 1:29 pm Having an attribute with the same name and value in two BOs does not mean that they are connected.
How is the relation between BO1 and BO2 made in the first place, and why is the IndID attribute needed? If you can describe the workflow, it should be easy to come up with a permanent solution.
I haven't made a parent/child relation, but peer. Is that wrong? The shortcut video showed peer relationship?
joben wrote: ↑Fri Feb 09, 2024 1:29 pm You can try to force a relation and see how it looks like in the query after that.
Put this update rule in BO1 like this and save the object:
If EXISTS BO2 WHERE (BO2.IndID=BO1.IndId) Then
INSERT BO2 IN BO1.BO2
This should work as long as the relation name is also called BO2.
This rule is obviously not that great, but maybe can serve as an example of the difference how it looks like when the relation is established and when it is not. Your shortcut should display fine after this for the object that you saved.
Not sure if I understand, but as long as you can edit an object and add a reference to a row in BO2 (or use a rule), the shortcut should work fine.lueu wrote: ↑Fri Feb 09, 2024 2:36 pm Follow up question:
Does shortcuts only work for objects created/edited after relationship and shortcuts are made? Not for existing objects in the table(BO)?
Since I can create a new object using a reference attribute to select/set a value, and this will show, but the already existing objects shows nothing in the shortcut column?
Because if this is the case, it's working now, just not the way I wanted it to![]()
joben wrote: ↑Fri Feb 09, 2024 3:16 pm The only reason I can think of why you would want the IndID attribute is if you are importing data from another source, and want to establish AwareIM relationships based on these values. However, if the users are adding the data themselves, you will not need this attribute. I think IndID is something you might have created because you are thinking in the terms of a SQL database guru rather than an AwareIM Config Tool user![]()
Thanks Bruce, now it all makes sence!BLOMASKY wrote: ↑Fri Feb 09, 2024 6:01 pm Jumping in the middle here, but to use a shortcut you 1st have to create a relationship between 2 BO's. (Tables). This does NOT automatically populate the relationship in EXISTING records. Only when new records are created. Aware creates 3 fields in the child table (if it is a many to many then a new relationship table is created). So if you have existing records, you can easily write a sql procedure to update the existing records. Newly created records after you define the relationship will be maintained by Aware. If you need assistance in writing the SQL to update the existing tables, let me know.
Bruce