Replacing a value in multivalued attribute - Action workflow

Answered Replacing a value in multivalued attribute - Action workflow

  • Friday, November 16, 2012 11:32 PM
     
     

    There are two attributes: PositionType(singlevalued attribute) and PositionTypes (multivalued attribute).

    Adding or changing PositionType should reflect in PositionTypes (multivalued attribute).

     Question:

     

    I can add the new value of PositionType to PositionTypes. But how can I delete the old value of PositionType from PositionTypes.

    I couldn’t find a lookup grammar to code in Action workflow. I tried using /Delta and /ComparedRequest.

All Replies

  • Saturday, November 17, 2012 7:47 PM
     
     

    So are you saying that if PositionType changes from A to B..

    You want to add B to PositionTypes and remove A from PositionTypes?


    Frank C. Drewes III - Architect - Oxford Computer Group

  • Saturday, November 17, 2012 8:41 PM
     
     
    yes.
  • Saturday, November 17, 2012 11:19 PM
     
     Answered

    Frank,

    I got the solution. I used

    A) authorization workflow

    B)in action activity, I used //target/PositionType (to get the old value) and //delta/PositionType (to get the new value).

    Thanks!

    • Marked As Answer by fim_sc Saturday, November 17, 2012 11:19 PM
    •  
  • Monday, November 19, 2012 6:53 AM
     
     Answered
    Yes, that's what I would recommend. Just be aware that if the change comes through the sync service, it will bypass your authorization rule - otherwise, you should be good.

    Frank C. Drewes III - Architect - Oxford Computer Group

    • Marked As Answer by fim_sc Monday, November 19, 2012 2:52 PM
    •  
  • Monday, November 19, 2012 2:53 PM
     
     
    Thanks Frank. So, is there any other solution which can be enforced by sync rule?
  • Thursday, December 13, 2012 3:56 PM
     
     

    Frank, How can I add a string value to a multivalued attribute?

    InsertValues("string")..will this work?

  • Friday, December 14, 2012 2:18 PM
     
     

    Yes, Here's an example for setting an UpdateResource (named updateGroup) UpdateRequestParameter collection to add a member to a static group

    updateGroup.UpdateParameters = new UpdateRequestParameter[]

    {
       new UpdateRequestParameter("ExplicitMember",
       UpdateMode.Insert,
       parentWorkflow.TargetId)

    };


    Frank C. Drewes III - Architect - Oxford Computer Group

  • Saturday, December 15, 2012 9:37 PM
     
     
    Thanks Frank! I am new to FIM and I haven't got to that point that. Where would I write this code?
  • Sunday, December 16, 2012 7:11 PM
     
     

    It would be in a custom workflow activity. Here's a sample activity to give you some idea what's involved.

    http://msdn.microsoft.com/en-us/library/windows/desktop/ff859524(v=vs.100).aspx


    Frank C. Drewes III - Architect - Oxford Computer Group