Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Dynamic Custom Fields or Dynamic Custom Variables

Hi,

Is there anyway to generate dynamic Custom Field data based upon two other Inventory Fields?

I'm trying to take two fields split them, jumble them and reassemble (concatenate) them into the Custom Field data for each computer record.

e.g. Bios Asset Tag + Last 4 chars of Serial Number + 1st 3 chars of Serial Number

My end goal if possible is to populate the above into a custom variable that I can use in remote CLI commands, if that's possible

Thanks,

Craig

0

Comments

3 comments
Date Votes
  • No, it's not possible to do that natively.

    However, if you're willing to try out a Beta, that's absolutely something you could gather with the PowerShell Scanner. It can't fill that into a Custom Variable though.


    $SerialNumber = ( Get-CimInstance Win32_BIOS ).SerialNumber
    $AssetTag = ( Get-CimInstance Win32_SystemEnclosure ).SMBIOSAssetTag
    $First3 = $SerialNumber.Substring(0, 3)
    $Last4 = $SerialNumber.Substring($SerialNumber.Length - 4, 4)

    $AssetTag + $Last4 + $First3
    0
  • Hi Colby,

    Thanks for the comments above, the PowerShell Scanner sounds interesting.

    I had a quick read of the beta documents you linked, one question if you could please?

    Where do the results of the PowerShell Scanner script get put? So I can reference them in the Inventory?

    Do I need to attach them to the Custom Field I created or do they make their own against the Computer Records?

    Currently I'm importing these from a script running from our Quest K1000 box

    Thanks,

    Craig

    0
  • The results end up on the PowerShell page of the computer window: https://link.pdq.com/docs-inventory-beta?powershell_page.htm

    0