How to use Parameterized Fixlets

A guide of how to use Parameterized Fixlets, with tips, tricks, examples, and more.

This is a Wiki Post, so anyone can edit it and add to it.

Parameterized Fixlets are very powerful and useful, but the documentation could be a lot better. The process of debugging them is very tedious because you have to export the BigFix content, then edit it in an external editor, then import it. You have to repeat this over and over as you test and debug, deleting the old versions as you go to keep from cluttering up your console and losing track of the most current version.

Tips:

  • If you get a script error, always hit “no”
  • Use Version control, like GIT / GitHub
  • You can just copy and paste the code into the web page to save a new revision.
  • Does not need to be public ( GitLab is free )
  • Session Relevance can only be used to populate certain elements, not TextArea.
  • Select
  • MultiLineText
  • Specified Values can only be used to populate certain elements, not TextArea.
  • Select
  • MultiLineText
  • DefaultValue does not work with Session Relevance, only static text
  • Values populated with Session Relevance MUST return a plural result
  • Even if there is only 1 result, use a plural relevance statement, otherwise you get: undefined
  • Always use unique values of… unless you don’t want the results alphabetized
  • This is currently the only way I know how to get other elements values within a custom validator:
  • FixletUtils.getElementText('realpassword', metadataObj);
  • Quotes need to be escaped inside of strings in most cases: \"
  • often results in error expected '}' if done incorrectly

Known Issues:

Examples:

Related Posts:

Documentation:

2 Likes

Some extra commentary:


Disabled controls in a Parameterized Fixlet are very hard to read:


I really wish there was an option to have this use Session Relevance to pre populate a TextArea


  • It seems like other options should be possible
  • I’m not clear on what else FixletUtils can do
  • I’m not clear on what limitations this approach may have

As far as I know, Parameterized Fixlets do not work in the WebUI. It would be nice if there was a single method to do this for both the regular console and the WebUI. CC: @dexdexdex