Home Analyst Portal
Options

Custom Forms - System.Domain.User

Simon_ZeinhoferSimon_Zeinhofer Customer Ninja IT Monkey ✭✭✭✭

Hello guys,

I am trying to add Muliple Object Picker to the Domain User form, where only the Hardware Assets are shown, for which this User is a Custodian. It should be disabled of course, so it is read-only.

I created a Custom Form for the domain user class and changed the "UsersComputers" section.

I tried it this way:

{

             name: "UsersComputers",

             rows: [

               {

                 columnFieldList: [

                  {

                    PropertyName: "ConfigItem",

                    type: "multipleObjectPicker",

                    ClassId: "c0c58e7f-7865-55cc-4600-753305b9be64",

                    Disabled: true,

                    PropertyToDisplay: { DisplayName: "Name", "ObjectStatus.Name":"Status", LastModified:"LastModified"},

                    SelectableRow: false

                  }

                 ]

               }

             ]


           }


This works, but it also displays the Software Assets, which is not what I want it to do.

I know the ClassId which I set, is only there to set the Classes which are selectable if I enable the Object Picker. But is it possible to tell the picker, which objets should be visible or not? Or is there a Relationship Class which I don't know about, which does exactly what I want?

Answers

  • Options
    Peter_MuttenthalerPeter_Muttenthaler Partner Advanced IT Monkey ✭✭✭

    Hi,

    There is an example directly in the Cireson form templates (but for the primary user) = you have to search in the Hardware Asset Management Pack for the correct Source / Target Relationship info:

    the example ist:

    name: "RelatedHardwareAssets",

                      rows: [

                        {

                          columnFieldList: [

                             { name: "", type: "multipleObjectPicker", PropertyName: "Source_HardwareAssetHasPrimaryUser", ClassId: "C0C58E7F-7865-55CC-4600-753305B9BE64",PropertyToDisplay: {DisplayName:"DisplayName","HardwareAssetStatus.Name":"HardwareAssetStatus",LastModified:"LastModified"}, Disabled: false,ShowAddButton: false, ShowRemoveButton: false, SelectableRow: true, SelectProperty: "DisplayName" }

                          ],

                        }

                      ]

  • Options
    Simon_ZeinhoferSimon_Zeinhofer Customer Ninja IT Monkey ✭✭✭✭

    Hello Peter,

    I might be wrong but i thought the Owner Relationship is not a relationship HardwareAsset <-> User. I thought this is a ConfigItem <-> User Relationship, which is not related to the Asset Management of Cireson. Whereas the Primary User is a Asset Management Relationship.

    In the Management Pack the only HasOwner Relationship is the one from the NoticeEvent.

    The issue I have here, is that the ConfigItem relationship shows the Targebtobjects I want, just too many and I don't know how to filter them :(

  • Options
    Peter_MuttenthalerPeter_Muttenthaler Partner Advanced IT Monkey ✭✭✭
    edited March 2022

    Hi Simon,

    you are right, Cireson uses the OOTB OwnedBy Relation:

    System.ConfigItemOwnedByUser

    maybe the filter for projection will help (Example):

    columnFieldList: [

                          {

                            name: "",

                            type: "multipleObjectPicker",

                            PropertyName: "Target_HardwareAssetHasPurchase",

                            ClassId: "001556ed-3ad5-5640-fee8-beb748da9e03",

                            ProjectionId: "376FEAFF-84BE-25F5-0AD0-E591F843479C",

                            PropertyToDisplay: { DisplayName: "DisplayName", "Target_PurchaseHasCostCenter.DisplayName": "CostCenter", "Target_PurchaseHasPurchaseOrder.DisplayName": "PurchaseOrder", "Target_PurchaseHasInvoice.DisplayName": "Invoice", "Currency.Name": "Currency", Cost: "Cost", "Target_PurchaseHasVendor.DisplayName": "Vendor" },

                            SelectableRow: true,

                            SelectProperty: "DisplayName"

                          }

                        ]


    there are several projections available in the Cireson Asset Management MP

  • Options
    Simon_ZeinhoferSimon_Zeinhofer Customer Ninja IT Monkey ✭✭✭✭

    Seems like there is no solution for that :(

  • Options
    Simon_ZeinhoferSimon_Zeinhofer Customer Ninja IT Monkey ✭✭✭✭

    +1

  • Options
    Jeff_LangJeff_Lang Customer Ninja IT Monkey ✭✭✭✭

    this one is working for us, but it's not often we add custodians on non hardware assets though


             "name": "ConfigurationItemsForWhichThisUserIsACustodian",

             "rows": [

              {

                "columnFieldList": [

                 {

                   PropertyName: "ConfigItem",

                   type: "multipleObjectPicker",

                   ClassId: "62F0BE9F-ECEA-E73C-F00D-3DD78A7422FC",

                   PropertyToDisplay: { DisplayName: "DisplayName", FullClassName: "Type", "Status.Name": "Status", LastModified: "LastModified" },

                   SelectableRow: true,

                   SelectProperty: "DisplayName"

                 }

                ]

              }

             ]

  • Options
    Simon_ZeinhoferSimon_Zeinhofer Customer Ninja IT Monkey ✭✭✭✭

    Hello @Jeff_Lang

    thanks for the answer :)

    But this class is the config item class and therefor this shows all config items where the user is a custodian :) We already have that ;)

    I would like to filter it, e.g. to show ONLY Hardware Assets and nothing else. Right now it also shows Business Services, Cost Centers and so on.

Sign In or Register to comment.