A part of a string is being displayed as a clickable phone number

Hi all -- my third question of the day :open_mouth:

I have an app that, at the end of the form, presents a single page
summarizing various information.

One of the fields shown is the a 16-digit "UIC" code, the second half of
which encodes information about the services provided to a patient.

This full 16-digit code is constructed as a hidden value, which contains a
concat() which puts together an existing string called loadname, plus three
other fields that make up the final 8 digits.

But, when the page displays, somehow it is deciding to show the final 8
digits -- which is actually just part of a concatted string -- as a
clickable phone number in blue text! None of the fields involved are
formatted as type "Phone number or numeric ID."

See attached screenshot.

Note: I believe that if the 16-digit string has the final 8 digits
containing alphabetic characters, which can happen, it (not surprisingly)
doesn't interpret this as a phone number.

How can I get it to stop identifying that final 8 digits as a phone number?

For your info, below is the formula used in the hidden value that
constructs the full 16 digit code. In this concat, it's the content after
the first argument that is winding up turning into a clickable string.
Thanks! -Eric

concat(/data/loadname,/data/four-digit-provincial-and-district-code,/data/service-provider-code,/data/treatment-provided)

Eric,

Sorry about that!

Off the top of my head the easiest thing to do would probably be to
introduce a unicode non-breaking-space or other character into the string
to break it up.

Can you try this expression?

concat(/data/loadname,/data/four-digit-provincial-and-district-code, '
 ',/data/service-provider-code,/data/treatment-provided)

If that works and you don't want the space in the middle, you can try
moving the ' ' expression to the end or beginning of the string and
see if that also prevents the app from spotting it as a phone number.

-Clayton

··· On Fri, Dec 12, 2014 at 4:38 AM, Eric Stephan wrote:

Hi all -- my third question of the day :open_mouth:

I have an app that, at the end of the form, presents a single page
summarizing various information.

One of the fields shown is the a 16-digit "UIC" code, the second half of
which encodes information about the services provided to a patient.

This full 16-digit code is constructed as a hidden value, which contains a
concat() which puts together an existing string called loadname, plus three
other fields that make up the final 8 digits.

But, when the page displays, somehow it is deciding to show the final 8
digits -- which is actually just part of a concatted string -- as a
clickable phone number in blue text! None of the fields involved are
formatted as type "Phone number or numeric ID."

See attached screenshot.

Note: I believe that if the 16-digit string has the final 8 digits
containing alphabetic characters, which can happen, it (not surprisingly)
doesn't interpret this as a phone number.

How can I get it to stop identifying that final 8 digits as a phone number?

For your info, below is the formula used in the hidden value that
constructs the full 16 digit code. In this concat, it's the content
after the first argument that is winding up turning into a clickable
string. Thanks! -Eric

concat(/data/loadname,/data/four-digit-provincial-and-district-code,/data/service-provider-code,/data/treatment-provided)

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thanks – I will try this!

Great! Please report back on how it goes so folks will know.

-Clayton

··· On Mon, Dec 15, 2014 at 4:17 AM, Eric Stephan wrote: > > Thanks -- I will try this! > > -- > You received this message because you are subscribed to the Google Groups > "commcare-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to commcare-users+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. >

Hi Clayton –

Hmm – I tried using your method – I tried with both single as well as
double quotes around the escape string – but it doesn’t insert the escape
string correctly, rather it sticks   into the output – see attached
screenshot

Here is what I have in the hidden value field – again I also did it with
single quotes

concat(/data/loadname,/data/four-digit-provincial-and-district-code,
" ", /data/service-provider-code,/data/treatment-provided)

any thoughts? --eric

Hm, odd, I tested this locally with the following expression in my Question
label:

XML non-breaking-space entity between pipes: <output ref="concat(’|’,

’ ', ‘|’)"/>

and it seemed to be processing the NBSP correctly. Maybe we should take
this offline? Can you create a support ticket from your HQ form? I’d be
happy to take a look as to why it’s not escaping.

-Clayton

··· On Wed, Dec 17, 2014 at 5:33 AM, Eric Stephan wrote: > > > > Hi Clayton -- > > Hmm -- I tried using your method -- I tried with both single as well as > double quotes around the escape string -- but it doesn't insert the escape > string correctly, rather it sticks   into the output -- see attached > screenshot > > Here is what I have in the hidden value field -- again I also did it with > single quotes > > concat(/data/loadname,/data/four-digit-provincial-and-district-code, > " ", /data/service-provider-code,/data/treatment-provided) > > > any thoughts? --eric > > -- > You received this message because you are subscribed to the Google Groups > "commcare-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to commcare-users+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. >

Thanks! I will test it once again and if no luck, will submit it. Note:
Your test tested the concat inside an OUTPUT command, whereas my concat is
operating inside the Calculate Condition of a Hidden Value field.