Hardwareasset.js File
Hello,
when we copy the hardwareasset.js file in the CustumSpace folder, the "Model" and "Manufacturer" fields does not display the stored values.
When we delete the hardwareasset.js file from the Custum Space folder all values are correct.
We checked the js File and the DataTypes from the properties "Model" and "Manufacturer" are "String" not the "Enum" Type:
{
columnFieldList:
[
{ DataType: "String", PropertyDisplayName: "Manufacturer", PropertyName: "Manufacturer", Required: false, EnumId: '0E82DAD7-5853-33F7-E4C0-C34C478FE70A' },
{ DataType: "String", PropertyDisplayName: "Model", PropertyName: "Model", Required: false, EnumId: '5D2715B3-91A1-3868-FAF6-AB7DD98DAAF4' }
]
},
How can we edit the Hardwareasset.js file to display the stored values correctly?
Thanks
Best Answers
-
Dijon_Blease Customer IT Monkey ✭
@Stefan_Zieler If you are wanting to use the enum values instead of the string values then you have to change what property you would like to bring back. I think there is Manufacturer and Model properties for an asset, and these deal with the string values. The properties that deal with the enums are ManufacturerEnum and ModelEnum.
You would change the "PropertyName" values as shown below and that might get you what you want.
{ columnFieldList: [ { DataType: "String", PropertyDisplayName: "Manufacturer", PropertyName: "ManufacturerEnum", Required: false, EnumId: '0E82DAD7-5853-33F7-E4C0-C34C478FE70A' }, { DataType: "String", PropertyDisplayName: "Model", PropertyName: "ModelEnum", Required: false, EnumId: '5D2715B3-91A1-3868-FAF6-AB7DD98DAAF4' } ] }
5 -
Stefan_Zieler Customer IT Monkey ✭
Hello,
{ DataType: "Enum", PropertyDisplayName: "Manufacturer", PropertyName: "ManufacturerEnum", Required: false, EnumId: '0E82DAD7-5853-33F7-E4C0-C34C478FE70A' },
{ DataType: "Enum", PropertyDisplayName: "Model", PropertyName: "ModelEnum", Required: false, EnumId: '5D2715B3-91A1-3868-FAF6-AB7DD98DAAF4' }
These changes brought back the desired stored values.
Thanks for the hints
0
Answers
Hello @Stefan_Zieler
As far as I can tell it seems to be working as expected, are you wanting to change this so that you can edit those values?
Thanks,
Shane
@Stefan_Zieler If you are wanting to use the enum values instead of the string values then you have to change what property you would like to bring back. I think there is Manufacturer and Model properties for an asset, and these deal with the string values. The properties that deal with the enums are ManufacturerEnum and ModelEnum.
You would change the "PropertyName" values as shown below and that might get you what you want.
Hello,
{ DataType: "Enum", PropertyDisplayName: "Manufacturer", PropertyName: "ManufacturerEnum", Required: false, EnumId: '0E82DAD7-5853-33F7-E4C0-C34C478FE70A' },
{ DataType: "Enum", PropertyDisplayName: "Model", PropertyName: "ModelEnum", Required: false, EnumId: '5D2715B3-91A1-3868-FAF6-AB7DD98DAAF4' }
These changes brought back the desired stored values.
Thanks for the hints