powerappspowerapps-formulapowerapps-modeldrivenpowerapps-collectionpowerapps-selected-items

Prepopulate the ComboBox using comma-seperated String


The string looks like:

teststring = "Sunday,Monday"

enter image description here

In combobox's DefaultSelectedItems when I write like this, it works.

How can I make this kind of format dynamically using the above teststring (even when teststring changes to something else)??


Solution

  • The below code worked for me:

    ClearCollect(collectOutput,RenameColumns(Split(Teststring,","),"Result", "Value"))
    

    To access the collect list I just wrote collectOutput.Value in DefaultSelectedItems Property