Difference between VARIANT_BOOL and SFTPAdvBool

In EFT, a check box can be selected (usually TRUE) or cleared (usually FALSE) in the user account, inherited from its Settings Template, or inherited from the Site. For this reason, the API needs the corresponding functions: VARIANT_BOOL and SFTPAdvBool.

VARIANT_BOOL has only two possible values:



SFTPAdvBool has three possible values:

abFalse = 0

abInherited = -2

abTrue = 1

When a script calls a function and wants to know the state (enabled/disabled) of that value, the result is either -1 (selected) or 0 (cleared). VARIANT_BOOL cannot return information about the inheritance of that value, only whether it is selected or cleared. However, a check box setting can be inherited (TRUE) and cleared (FALSE). For these functions, SFTPAdvBool is used instead of VARIANT_BOOL.

All three possible check box states are stored in SFTPAdvBool:

typedef enum


        abFalse = 0,

        abTrue = 1,

        abInherited = -2

  } SFTPAdvBool;

So to make the state inherited, (-2) should be called.

Another parameter, pInherited, is similar to VARIANT_BOOL, but declared as a VARIANT due to VB limitations. pInherited is -1(VARIANT_TRUE) when pVal was inherited from the upper level and 0(VARIANT_FALSE) when it is not inherited.