The %% is used to highlight a formula which is valuated generating the criterion.
The $$ is used to indicate the user field number which will be used as a value of this criteria.
If the user field is in alphanumerical mode and if it is used in a formula, remember to add inverted commas, if necessary.
For instance, let us consider the formula (&(objectclass=user)(sAMAccountName=%%toupper("$$4$$")%%))
The $$4$$ represents the field [F:AUS]LOGIN.
Upon login of a user, this field is replaced by the user login and then evaluated (uppercase) and the search criteria in the LDAP becomes for this user:
(&(objectclass=user)(sAMAccountName=LOGIN))
It is also possible to enter (&(objectclass=user)(sAMAccountName=$$4$$))