change a list to string using a microflow

1
Hello  who i can change a list to string in microflow? Now i need change $AccountList to string. Any idea?   Best regards  
asked
2 answers
1

So you want a string of some attribute in account, for instance, the account name?

  • Create a string variable “AccountNames” with value empty
  • Add a loop and iterate over your list of accounts
  • Inside the loop, change the AccountNames to the following (assuming you want a comma separated string):
    if $AccountNames != empty
    then $AccountNames + ',' + $IteratorAccount/Name
    else $IteratorAccount/Name

    After you're done looping, you'll have a comma separated string of all your account names. Adjust as needed if you need a different string.

answered
0

In addition to Eline’s answer, if you need the Count of $AccountList to be a string, and assuming you called this value $AccountCount, you can use the following when you create a new String variable.      

toString($AccountCount)

https://docs.mendix.com/refguide/to-string

answered