Is it possible to use formatting and newlines in a concatenation?

3393
9
Jump to solution
10-19-2017 09:26 AM
ElliottPlack1
New Contributor III

I want to provide dynamic feedback in a note that summarizes the responses. I have been successful in deploying these summaries with both newlines (\n) and tabs (\t) in the concatenation formula (concat). When I try to add some formatting to the concatenation, it breaks the newline and tabs, so that everything appears on one line.

I have attached a form to test this. In the results, we can see that adding some bold text to the concat causes an issue.

Is it possible to apply formatting in the same concatenation form that a newline appears?

survey test results

Tags (1)
1 Solution

Accepted Solutions
JohnathanHasthorpe
Esri Regular Contributor

Hi Elliott,

I have had a look at your form and this behaviour looks to be a bug.

We will get this raised internally.

Thanks

John

View solution in original post

9 Replies
JohnathanHasthorpe
Esri Regular Contributor

Hi Elliott,

I have had a look at your form and this behaviour looks to be a bug.

We will get this raised internally.

Thanks

John

ElliottPlack1
New Contributor III

Thanks for filing that John!

I tested this and found it to be an issue on Survey123 Connect v 2.4.60 on Windows 10

0 Kudos
AndrewHargreaves2
Occasional Contributor III

FYI I got this working using something like the below:

concat("<font color='red'><b>HORIZONTAL ACCURACY OF ", ${HORIZONTAL}, " IS INSUFFICIENT</b><font>")

This picks up the red and the bold tags. Weirdly though, if I try the below it refuses to pick up the center tag:

concat("<center><font color='red'><b>HORIZONTAL ACCURACY OF ", ${HORIZONTAL}, " IS INSUFFICIENT</b><font><center>")

ElliottPlack1
New Contributor III

Thanks! Another workaround is making many note fields without a field name so they're each listed on a new line.

0 Kudos
AndrewHargreaves2
Occasional Contributor III

James Tedrick‌ / Ismael Chivite

Can I ask you to comment on the fact that my concatenated <center/> tag won't work? everything else does; font color, bolding etc....

concat("<center><font color='red'><b>HORIZONTAL ACCURACY OF ", ${HORIZONTAL}, " IS INSUFFICIENT</b><font><center>")
0 Kudos
JohnathanHasthorpe
Esri Regular Contributor

Hi Andrew - this is a known bug which is in our backlog. I've added your request to the internal issue.

ErikLeigh
New Contributor III

Are there any updates to this issue?  I'm not sure it's exactly related but I see the original poster using \n for a line break.  I've been trying to use that in my calculation field and it doesn't seem to be working.  Thanks!

SueJohnston
New Contributor III

Johnathan Hasthorpe

I'm using version Survey Connect 3.0.128 and am still experiencing the same thing Elliott Plack‌ was.

Safe to assume this is still a bug?

Thanks!

FieldUser1One
New Contributor III

Hi,

I'm wanting my people to work with the web dashboard/survey 123 editor.  However I've noticed that this formatting doesn't apply to the web form, and only works on the field app using this code:  

concat('Bedrock Type:',${Bedrock_Type},"\n",'Observed from: ',${Bedrock_KPRge},"\n",'Bedrock Depth: " ',${Bedrock_Depth},' m, Bedrock Depth Range: ',${BedrockDepth_Rge},"\n",${Sample_Reason_Cct},'; # Samples: ',${Nmbr_SamplesPerActivity})

Is there a different code I should use in this case?