I hope I have explained it enough, I am stuck at the Get Variables stage where I need to combine the variables back together with a comma separator, but not the last one or if its a single variable.
Hi there, no it can vary, it could be one or multiple variables.
For context, each technician does a fire-safety assessment check of a business and prepares a quote of recommended items etc. So every job will differ in what they access from each product category: Fire alarms (data_FA), Fire Sprinklers (data_FS), Fire Doors (data_FS), Emergency Lighting (data_EL).
So empty ones should be ignored.
The Get Variables returns only the variables that have data - which is great:
Which seems to work perfectly and create the required output I need, I was able to test it and it worked as expected. What are your thoughts on this approach?
Yeah, converting them to an array and then turning that in a comma separated list is a good approach.
You can also try replacing the iterator and the text aggregator with the join() function. It should do the same thing and save two operations. Then you can put that on top of the function to turn it in an array and move those directly in the HTTP module removing the need for the Set variable module as well.