none
Multiple Condition in IIF and do nothing if value is false RRS feed

  • Question


  • Hello,

    I want change DN of user if two condition is meet.

    My condition Company attribute and JobTitle attribute and i want change DN of user is two attribute are meet and want nothing change if conditions doesn't happened.

    Please help me that how can i do this?
    Monday, July 18, 2016 11:46 AM

Answers

  • you need to create a new attribute in metaverse to have the DN attribute.

    or you can use whatever logic is used to build the DN, so instead of DN you can write "CN="+accountName+",OU=All Users,DC..." assuming all your users that don't have this companyName need to be in the All Users OU


    Did my post help? Please use "Vote As Helpful", "Mark as answer" or "Propose as answer". Thank you!

    Tuesday, July 19, 2016 5:31 PM

All replies

  • you can do it in sync rules using IIF

    or you can do it with a workflow & MPR once change happens on company or job title.


    Did my post help? Please use "Vote As Helpful", "Mark as answer" or "Propose as answer". Thank you!

    Monday, July 18, 2016 1:51 PM
  • i use IIF in my outbound sync rule for DN as following:

    IIF(Eq(company,example),"CN="+accountName+",ou=exam,dc=conosto,dc=com","I don't now use what here that if condition is false , DN doen't changed"

    so when outbound sync rule apply to users with true MPR and workflow, sync rule applied truly, but when change company attribute to another string, AD Management agent full synchronization get error because the second action in IIF is not true.

    so the transition out MPR doesn't run and outbound sync rule doesn't remove from user object.

    another thing is, i want to use two condition in IIF same time, for example:

    IIF(Eq((company,example),(jobtitle,example2)), ...

    but this format is not true.

    if use multiple condition is possible in IIF, Please write it in correct format.

    Monday, July 18, 2016 5:01 PM
  • you can use multiple conditions this way, which will run the inner IIF if condition1 is true

    IIF(condition1,IIF(condition2, If True, If False), If False)

    If you don't want the attribute to change, then you need to just pass the current value. Assume dn is already in MV, you can make the False action to be just passing that dn.


    Did my post help? Please use "Vote As Helpful", "Mark as answer" or "Propose as answer". Thank you!

    Tuesday, July 19, 2016 12:49 PM
  • by this format, must set two false action, that is not matter because used the same action in both.

    I write it as following and not working:

    IIF(Eq(company,"example"),"CN="+accountName+",OU=...,DC=...,DC=...", DN)

    it has error, DN is not a attribute.

    How I use the previous DN in false section?

    Tuesday, July 19, 2016 4:04 PM
  • you need to create a new attribute in metaverse to have the DN attribute.

    or you can use whatever logic is used to build the DN, so instead of DN you can write "CN="+accountName+",OU=All Users,DC..." assuming all your users that don't have this companyName need to be in the All Users OU


    Did my post help? Please use "Vote As Helpful", "Mark as answer" or "Propose as answer". Thank you!

    Tuesday, July 19, 2016 5:31 PM
  • Thank you Taher, Problem Solved
    Saturday, July 23, 2016 4:38 AM