I am wondering how can I set an ad attribute bit value based on a boolean metaverse value.
So if I want to set LSB to 1 in ad, is this the correct way? I am a little bit confused with this.
IIF(BooleanAttribute,BitAnd(1,1),BitAnd(1,0))
Technology Tips and News
I am wondering how can I set an ad attribute bit value based on a boolean metaverse value.
So if I want to set LSB to 1 in ad, is this the correct way? I am a little bit confused with this.
IIF(BooleanAttribute,BitAnd(1,1),BitAnd(1,0))
Hello 2xTsei,
Please check Functions Reference for FIM 2010.
IIF() has to have a function inside, it's not like an "if" operator in PowerShell/any programming language - so there is a need of funtion, not only variable. So you have to do something like:
IIF(Eq(BooleanAttribute,"true"),BitAnd(1,1),BitAnd(1,0))
IIF(Eq(BooleanAttribute,"true"),BitOr(1,1),BitOr(1,0)) -> Attribute in AD
I am using a custom expression above. So what I want is set the Attribute in AD LSB to 1 when BooleanAttribute is true and set the the Attribute in AD LSB to 0 when BooleanAttribute is false.
So if Boolean Attribute is true and the Attribute in AD has LSB set to 0, I want change it to 1. For example 00000 -> 00001.
And actually it is like below when working with boolean attribute:
IIF(BooleanAttribute,,BitAnd(1,1),BitAnd