I am trying to write a expression List.Add(value) in assign activity, Getting error “Expression does not produce a value”
Kindly help me how to add values to list
I am trying to write a expression List.Add(value) in assign activity, Getting error “Expression does not produce a value”
Kindly help me how to add values to list
Hi @taeeb
Follow below steps to create string list
Hi bhuvan,
Tq for the solution.
How to add value in list. Can you please provide the syntaxes for add the value to list and how to retrieve values from that list.
Regards,
AMD Taeeb
Hi @taeeb
Steps to retrieve value from list
Regards,
Bhuvan Pandey
Hi Bhuvan,
Can you please share steps to add the values to the list
Regards,
AMD Taeeb
Hi,
Assign activity do not support complex data structures. Only String/ Boolean / Int / Double and Date data type are supported.
Regards,
Amit
Hi,
Is there any alternate solution for adding values to list?
Regards,
AMD Taeeb
There’s a solution to make this work. Use Powershell!
Create a string argument. let’s say MyList. Initialize its value to “$list=‘Sample1’, ‘Sample 2’, ‘Sample 3’”
to add more values to the list concatenate it by “,‘New Value’”.
And then you can perform the powershell operation on list.
like if you want to check if your list contains ‘Sample 1’, then
join your list in the string format along with the powershell command to check it.
Example - “$list=‘Sample1’, ‘Sample 2’, ‘Sample 3’”+argumentWhichcontainsNewlineCharacter+"$list -contains ‘Sample 1’"
This will return True.
Let me know if this works for you. Ping me in case it doesn’t work.