shobdy
(Shawn Hobdy)
February 25, 2025, 10:24pm
1
Hello,
I have a Method Directive BPM on ‘Erp.BO.InventoryQtyAdj.SetInventoryQtyAdj’.
I was asked if I could send an email with multiple fields in it.
That I can do.
My problem is they want the Serial Numbers to pass into the email also.
If it only has one serial number, it works fine.
I need it to be able to send multiple serial numbers separated by a comma.
It looks like the relevant serial numbers are stored at: dsSelectedSerialNumbersRow.SerialNumber
How would I be able to combine all the serial numbers within the C# Expression box for a set variable?
Any help is appreciated.
kve
(Kevin Veldman)
February 25, 2025, 11:23pm
2
I would probably create a custom code widget in between, and use it to set a string variable. So create a string type variable for the BPM called something like AllSerialNums
var SNList = ttSelectedSerialNumbers.Where( x => x.Updated() ).Select( s => s.SerialNumber ).ToArray();
AllSerialNums = String.Join(",", SNList);
3 Likes
shobdy
(Shawn Hobdy)
February 26, 2025, 2:53pm
3
Thank You!
This just a couple of small modifications, it did exactly what I needed!
I had to change Updated() to Added() and change the variable name from AllSerialNums to the one I already had created.
You are a life saver!
2 Likes
kve
(Kevin Veldman)
February 26, 2025, 3:03pm
4
Excellent, glad it worked!