Adding spaces between multiple referenced fields in a calculation
I have been trying to make a simple code to return a title for a meeting, which will show the date (month and year) and the organisation the meeting was with. If the organisation field is empty, I would like it to return the names of people present at the meeting (which is a separate field).
I can't seem to work out how to place a space between the referenced fields that come out of the calculation. For example:
It reads "Organisation A,Organisation B | MM/YYYY"
I would like it to read ""Organisation A, Organisation B | MM/YYYY"
Similarly if the Organisation field is blank I would like it to read:
"Person Present A, Person Present B | MM/YYYY"
I'm sure this must be simple to fix, but I can't seem to find the the quick fix from searching around.
Here is my code so far:
var participant = @All of Organisation name
if(@All of Organisation name!= ""){
participant = @All of Organisation name;
}
else{
participant = @All of Name
}
participant + " | " + moment(@Date).format("MM/YYYY");
Can someone tell me how to add spaces between the multiple names of people or organisations? Thank you!
Please sign in to leave a comment.
Comments
0 comments