I'm trying to concatenate JSM form values to create an address but ONLY if they have a value in them. The smart values for the form fields are as follows
I'm currently using the following smart value with concat() and if() functions:
{{concat(issue.forms.1f28bc04-0d32-402a-8b0e-d34cce50096c.in-emp-subloc-3, if(issue.forms.1f28bc04-0d32-402a-8b0e-d34cce50096c.in-emp-subloc-3, ", "), issue.forms.1f28bc04-0d32-402a-8b0e-d34cce50096c.in-emp-subloc-2, if(issue.forms.1f28bc04-0d32-402a-8b0e-d34cce50096c.in-emp-subloc-2, ", "), issue.forms.1f28bc04-0d32-402a-8b0e-d34cce50096c.in-emp-subloc, if(issue.forms.1f28bc04-0d32-402a-8b0e-d34cce50096c.in-emp-subloc, ", "), issue.forms.1f28bc04-0d32-402a-8b0e-d34cce50096c.iin-emp-locality)}}
The form fields are as follows:
- in-emp-subloc-3 - Sub-locality 3
- in-emp-subloc-2 - Sub-locality 2
- in-emp-subloc - Sub-locality
- in-emp-locality - Locality
So, for example, given the following set of values:
- Sub-locality 3: Box 34, Unit 5
- Sub-locality 2: Yerendra Square
- Sub-locality: Western Arm
- Locality: Yarani
The output would be: Box 34, Unit 5, Yerendra Square, Western Arm, Yarani
But given the following set of values:
- Sub-locality 2: Yerendra Square
- Sub-locality: Western Arm
- Locality: Yarani
The output would be: "Yerendra Square, Western Arm, Yarani", not ", Yerendra Square, Western Arm, Yarani"
However, when I try to return the smart value above, I just get an empty string.
Any ideas?