Home Analyst Portal

Layout options for custom multipleObjectPicker

Valerie_SirouxValerie_Siroux Customer IT Monkey ✭
Hi

I created a custom multipleObjectPicker on the change form.
But the layout is a mess.
On the screenshot below - the multipleObjectPicker is in the green box.
It doesn't have a title or so.

Is their a way to give it a title in the same layout style as "Affected Configuration Items"?
Because now, there is only a button and an empty grid. People won't use this because they don't know the meaning of this button.


Best Answers

Answers

  • seth_coussensseth_coussens Member Ninja IT Monkey ✭✭✭✭
    Not knowing what your code looks like or how you integrated it into the form it's difficult to say, but you could use the form editor to create a new field group like this...

    {
        "Default":{
        tabList: [
            /*********/
            /** TAB **/
            /*********/
            {
                name: "General",
                content: [
                    {
                        customFieldGroupList: [
                            {
                                name: "IncidentInformation",
                                rows: [                                
                                    {
                                        columnFieldList: [
                                            { DataType: "UserPicker", PropertyDisplayName: "AffectedUser", PropertyName: "RequestedWorkItem" },
                                            { DataType: "String", PropertyDisplayName: "Alternatecontactmethod", PropertyName: "ContactMethod", ColSpan: 2, MinLength: 0, MaxLength: 256 }
                                        ],
                                    }
    


    This would then provide a section header where you could place the custom picker.
  • Valerie_SirouxValerie_Siroux Customer IT Monkey ✭
    I used this code to add a multipleObjectPicker to the General tab.
    {
                                                columnFieldList: [
    {
    name: "Related Support Catalog",
    DisplayName: "Related Support Catalog",
    type: "multipleObjectPicker",
    PropertyName: "RelatesToConfigItem",
    ClassId: "310dc9e7-3da4-50db-b6fd-9247af499b1c",
    PropertyToDisplay: {DisplayName:"Name"},
    }  
                                                ]
                                            }

    I think I need something like the name property on the customFieldGroupList for the columnFieldList. I tried several options but none of them seems to work.
    I would like to add this to the General tab, but using your code, it only works I if place it on another tab.

    Is it possible to add this to the general tab?
  • Valerie_SirouxValerie_Siroux Customer IT Monkey ✭
    edited January 2017
    Thanks Geoff!

    It's looking better now :smile: 

    Only a few issues left  - I had to add the column Asset Status to the PropertyToDisplay list.
    Not able to add items without this property.
    Error when trying to add: Uncaught ReferenceError: AssetStatus is not defined

    When including this in the PropertyToDisplay list:  PropertyToDisplay: {DisplayName:"Name",SLA:"SLA", AssetStatus:"Asset Status"},
    I can it into the grid.
    But when applying the CR, the Asset Status and SLA (both are enum), changes to [object Object]
    Before applying the CR I can see the values correctly :/



  • Valerie_SirouxValerie_Siroux Customer IT Monkey ✭
    Thanks - It's working correctly now !
Sign In or Register to comment.