Menu

Using AttributeLinkedSet with ExternalField

2025-03-12
2025-03-13
  • Lucas Poirier

    Lucas Poirier - 2025-03-12

    We have an OS Family, OS Version and OS Edition. This could be for example: Linux Ubuntu 16.04. We saved this information on the FunctionalCI, using externalkey fields pointing to each class.

    To reduce redundant data, we changed the OS Family and OS Version to be external fields, using the OS Edition id to get their id, essentially only saving the OS Edition on the CI, but still display the Family and Version.

    Now, on their own class, we had an AttributeLinkedSet to display a list of FunctionalCI using either this Family, or Version (same goes for Edition), but now, we get an error reading: "Error: The attribute code 'os_edition_family_id' is not an external key of the class 'FunctionalCI'." I was wondering if there is a way I can display a list of FunctionalCI, either using a filter query or another attribute type.

     
  • Lucas Poirier

    Lucas Poirier - 2025-03-13

    I figured it out. By using an AttributeDashboard, I can make it so I filter out what I need.

     <field id="functionalci_list" xsi:type="AttributeDashboard" _delta="define">
       <is_user_editable>true</is_user_editable>
       <definition>
         <layout>DashboardLayoutOneCol</layout>
         <title>OSFamily:Dashboard:functionalci_list</title>
         <auto_reload>
           <enabled>false</enabled>
           <interval>300</interval>
         </auto_reload>
         <cells>
           <cell id="0">
             <rank>0</rank>
             <dashlets>
               <dashlet id="1" xsi:type="DashletObjectList">
                 <rank>1</rank>
                 <title>Class:OSFamily/Attribute:functionalci_list</title>
                 <query>SELECT FunctionalCI WHERE os_edition_family_id=:this-&gt;id</query>
                 <menu>true</menu>
               </dashlet>
             </dashlets>
           </cell>
         </cells>
       </definition>
     </field>
    
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.