locked
Add each saved value as string item in extension attribute, comma RRS feed

  • Question

  • User-1667334073 posted

    Hi all,

    I am trying to save usernames in a string.

    For example, user 1 would select UserA from list, then save.  User 2 will then go in web app and save UserB, etc...

    What I need is the attribute to have  a comma delimited string like so:  

    UserA,UserB,UserC, etc...

    Currently, everytime I save a value from a textbox to the attribute it overwrites the existing.

    thanks!

    Monday, November 11, 2013 4:13 PM

Answers

  • User-1426144113 posted

    Hi,

    You can get the value before set the new value. Then combine the old value and new value, then set the combined value to the Attribute.

    If you still have the issue, please provide the code that you set the value.

    Thanks

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 13, 2013 3:29 AM

All replies

  • User-1426144113 posted

    Hi,

    I don't understand clearly that you said.

    Where is the list? Is it a web project?

     

    For example, user 1 would select UserA from list, then save.  User 2 will then go in web app and save UserB, etc...

     Whether the user1 and user2 is loged user? They are two client?

    Thanks 

    Tuesday, November 12, 2013 4:02 AM
  • User-1667334073 posted

    Sorry for not being clear.  Basically, how can I append a list with multiple values?  

    For example, I need to save a selected value from a ListBox on a web form to an ACtive Directory Attribute.

    This is a unicode attribute and I need to populate it with a string of values(usernames) that each logged on user selects from the Listbox.

    For example:

    User1 logs onto the web form, he selects "bsmith" from the listbox.  "Bsmith" then gets saved to the Attribute1.

    User2 logs onto the web form, selects "jDoe" from the listbox.  "JDoe" then gets saved to Attribute1.

    At the end of the day, when I go to the attribute and look at the string values, i will see:  "Bsmith, jDoe"


    I hope it's clearer?

    Thanks so  much !

    Tuesday, November 12, 2013 1:13 PM
  • User-1426144113 posted

    Hi,

    You can get the value before set the new value. Then combine the old value and new value, then set the combined value to the Attribute.

    If you still have the issue, please provide the code that you set the value.

    Thanks

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 13, 2013 3:29 AM
  • User-1667334073 posted

    LOL, that would work!  I can't beleieve I didn't think of that!!.  So simple.  thanks!

    Wednesday, November 13, 2013 11:43 AM