Can a custom pre-filled field be added?

user-ZEDhYZBJcz
New Contributor

Hi all,

To appease our auditors, we need to add a custom text field to all our Laptop entries.  It simply needs to say "

Data classification level: C2".

I've tried to do it via Extension Attributes, but it won't print out what I need.  (I'm sure I'm not using EA correctly) Has anyone been successful in just adding a custom text anywhere?  
 
Thanks in advance!
 
 
1 ACCEPTED SOLUTION

mm2270
Legendary Contributor III

Yes, you should be able to do this with an Extension Attribute. When you created your EA, did you choose Text Field as the Input Type? Because that should allow you to go into every computer record and click Edit and then locate the EA and enter the text you need for that Extension Attribute and save it.

I would probably consider using a Pop Up Menu type instead, just to make sure the entry can be chosen from a pre-defined list and will always be consistent. Otherwise you run the risk of human error in entering the text.

Edit: In re-reading your original post, if you really just need all Macs regardless of their actual state to have that text, then a simple EA that outputs that text should suffice. Something super simple like this should work. Note that for an EA to output text the text has to be wrapped between XML result tags. 

#!/bin/zsh

/bin/echo "<result>Data classification level: C2</result>"

 

View solution in original post

4 REPLIES 4

mm2270
Legendary Contributor III

Yes, you should be able to do this with an Extension Attribute. When you created your EA, did you choose Text Field as the Input Type? Because that should allow you to go into every computer record and click Edit and then locate the EA and enter the text you need for that Extension Attribute and save it.

I would probably consider using a Pop Up Menu type instead, just to make sure the entry can be chosen from a pre-defined list and will always be consistent. Otherwise you run the risk of human error in entering the text.

Edit: In re-reading your original post, if you really just need all Macs regardless of their actual state to have that text, then a simple EA that outputs that text should suffice. Something super simple like this should work. Note that for an EA to output text the text has to be wrapped between XML result tags. 

#!/bin/zsh

/bin/echo "<result>Data classification level: C2</result>"

 

@mm2270 Thank you very much for your guidance and suggestions here.  I'm still experiencing a similar issue where the EA description shows up but the output of "Data classification level: C2" won't display for some reason.  Even after adding the XML results tags.

If I can't get the above to work (which would be ideal) I'll most likely go the other route you suggested by using either the Text Field or Pop Up menu.

 

mm2270
Legendary Contributor III

Extension Attributes only show up in the device Inventory after an Inventory collection. So in other words run a recon (sudo jamf recon) on at least one machine and it should then show up. Most likely that’s why it’s not appearing. 

user-ZEDhYZBJcz
New Contributor

Thank you @mm2270. You were right.  The EA is now appearing on every device inventory.  Thanks for the help!