Zum Hauptinhalt gehen

Convert List<DataItem> to List<String>

Kommentare

3 Kommentare

  • Permanently deleted user
    Hi Francois, 

     

    The easiest way to convert a list of data items into a list of strings is this:

     

    User-added image

     

    Assuming that you want to use the DataItem's value in the string, then you would follow the syntax above. Otherwise, if you want to use the DataItem's display value, then you use this notation: item.Display

     

    You cannot just cast the list of dataitems into a list of string because dataitems come in a set or a pair of values (a display name and value) whereas the string is a single value. So you need to add the items from the dataitem list to the string in order to create a list. 

     

    I hope this helps. 

     

    Regards, 

     

    Carmen
    0
  • Permanently deleted user
    Super...thanks Carmen !!!
    0
  • Piper McKinnon
    I'm interested in this solution but the image link is broken, can someone repost?
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.