Hi everyone,
I have a scenario that goes like this :
- Webflow Form Submission
- Router
- Set Variable
- Create Record in my CRM
- Send an Email internally through Brevo Send Email integration
In the form, people have a multiselect where they can choose the type of equipment they own.
The Set Variable module handles that. And the ouput can look like below
[
{
"type_installation": [
"PAC A/E",
null,
null
]
}
]
or
[
{
"type_installation": [
"PAC A/E",
null,
"PV"
]
}
]
Now, in the subject and the body of my email I send the following:
âType of equipment : {{10.type_equipment}}â â> This is the Set Variable module.
The issue is that if the prospect selects only one service, I will receive
âType of equipment : , , PVâ
or
âType of equipment : "PAC A/E, ,
I tried some join / map / replace / trim, but I never make it workâŚ
I would appreciate your help to make it work 
Cheers
Hey @Quentin_h33,
Use this formula to clean up the value:
{{trim(replace(10.type_equipment; â,â; ââ))}}
Let me know if you need further clarification!
If this helps, kindly mark it as a solution 
Hello @Probotic_Solutions ,
thanks for your help.
I tried your solution (just adapted it to my scenario): {{trim(replace(4.type_installation; â,â; ââ))}}
But when I paste it, it looks like this:

If I try to update it to make it âworkâ, then it doesnât change anything 



Any idea?
Hi @Quentin_h33,
Apologies for the misunderstanding. Itâs a multiselect field where the user can select one or more options, including all. So, we just need to remove the empty elements from the array.
I tested it, and the following formula worked well:
{{remove(15.contacts; emptystring)}}
OR
{{remove(4.type_installation; emptystring)}}
Let me know how it goes. If this helps, please consider marking it as a solution. 
Hello,
Thanks again for your help but it doesnât seem to work.
ANy idea?
I was sure it would be simple but somehow I donât manage to have it rightâŚ
Hey Quentin,
what does the incoming data literary look like? Can you paste the output bundle form the module here?
I tested with the JSON strings from your initial post and this works:
{{remove(1.type_installation; null; emptystring)}}
Basically use the remove() function on the incoming array and have it delete any values that are either null or empty strings.
Hello,
Thanks for your help, it worked!! I am a âbitâ perfectionist so you canât imagine how happy I am thanks to you.
For your info
Here is the global scenario :
On the module âSet Variableâ
Input :
[
{
ânameâ: âtype_installationâ,
âscopeâ: âroundtripâ,
âvalueâ: [
null,
âClimatisationâ,
null,
âGazâ,
null,
null,
âPlomberieâ,
null
]
}
]
Output :
[
{
âtype_installationâ: [
null,
âClimatisationâ,
null,
âGazâ,
null,
null,
âPlomberieâ,
null
]
}
]
Here is the module content
{{add(emptyarray; if(1.data.pac = âtrueâ; âPAC A/Eâ; ); if(1.data.clim = âtrueâ; âClimatisationâ; ); if(1.data.pv = âtrueâ; âPVâ; ); if(1.data.gaz = âtrueâ; âGazâ; ); if(1.data.fioul = âtrueâ; âFioulâ; ); if(1.data.domestic_hot_water = âtrueâ; âECSâ; ); if(1.data.bathroom = âtrueâ; âPlomberieâ; ); if(1.data.plumbing = âtrueâ; âPlomberieâ; ))}}
Thanks again!