Concat() function: Do not display concatenated values until prequel data has been entered

1605
1
11-05-2017 03:59 AM
Siew_WeiGoh2
New Contributor III

In using the concat() function involving using fixed terms, such as 'and' shown in the example, in between referenced values, the term 'and' would be shown in the field as a default.

For example, I had used the functions as below to returns two result into one field:

In the Survey123 form, I will get  '()' as a default:

It works well once the prequel fields are selected:

However, I do not want the "()" or any other fixed character/s to be showing until the prequel information has been selected. How do I set it so it shows an empty field on default?

Thank you

SW

0 Kudos
1 Reply
by Anonymous User
Not applicable

Hi Siew,

You can use an IF statement with an OR on both the input fields as follows:

if((${calPullroadNm}='' or ${calPullroadType}=''),'',(concat(${calPullroadNm},'(',${calPullroadType},')')))

Hope that helps.

Phil.

0 Kudos