Filter all Bios Versions higher
I have a base Bios version J01 v02.25. I want to filter all the systems that have a higher version but I'm struggling with the syntax.
Bios Version, Version higher than, 2.25
I have also tried using 0102.25 but still does not work. It does not show me any systems whatsoever when there should be over 30.
I'm also using drill down from a parent collection. It shows all the systems with no filters applied
1
Comments
Sebastian,
I think the "version higher than" comparison assumes a format of only numbers and periods. You can try doing this with Regex, this filter should match your scenario of anything higher than J01 v02.25:
Computer > BIOS Version > Matches Expression > ^([a-zA-Z0-9]{3,5} v)((02)(\.)(2[6-9]|[3-9][0-9])|([0-9][3-9]|[1-9][0-9])(\.)([0-9]{2}))$
Obviously this is messy and the regex filter is kinda tricky, so this solution is not ideal. Hopefully someone else has a better idea. If you want me to explain the regex filter let me know.
lnichols Thanks very much Luke. I'm looking at that and trying to decipher it but can't really get a grasp in what it's doing :D
If you could briefly explain it that would be brilliant. If not, it's no worries - thanks again
Ok, let's break it down. First, the metacharacters:
The first is the "J01 v" section. We basically want to ignore this portion so we can just filter on the latter portions.
The next capture groups are the first two numbers in the version number, the period between them, and the last two numbers.
So, back to our expression. Here is is tabbed out on multiple lines to make it more readable:
Basically, we're saying:
Match any alphanumeric character between 3 and 5 times, followed by a space and a v, THEN
Match "02.26" through "02.29" OR
Match "02.30" through "02.99" OR
Match "03.00" through "99.99".
The reason we are using [1-9][0-9] instead of [0-9]{2} is to prevent matching on 01 or 02 for the last capture group,
since those would be lower versions and the numbers >= 02.26 are covered already by earlier capture groups.
Also, there's no shame in using a regex tester like this: https://regex101.com/
Throw a bunch of the version numbers from your environment in the text field at the bottom and play around with the regex syntax.
For our site I just set up collections for each model we have in use with subcollections showing which of each model have the latest BIOS and which are running an older BIOS with an Inventory variable setup for each model's latest BIOS version. So each time a new BIOS is released I just go in and update the variable and all my collections update automatically.