Concatenation of text, date and number fields

455
5
10-23-2019 12:39 AM
by Anonymous User
Not applicable

Is it possible to concatenate two or more fields with date, text and number types in Survy123. I havent seen any example.

0 Kudos
5 Replies
DougBrowning
MVP Frequent Contributor

Did you try to cast it

string(question or value)

Converts to string. Conversion varies depending on data type.

string({$question_one})

0 Kudos
by Anonymous User
Not applicable

Hi Doug,

Not going to only cast, I have about 3 or 4 fields with different types, date, number and text and want to concatenate it into one field.

Thanks

0 Kudos
DougBrowning
MVP Frequent Contributor

Yea that is what casting is.

string(${yournumberfield}) + ${yourstringfield} + string(${yourdatefield})

or

concat(string(${yournumberfield}), ${yourstringfield}, string(${yourdatefield}))

by Anonymous User
Not applicable

Hi Doug,

Many thanks. but couldn't resolved date field. for the date field it gives a number like 1570347000000 and I want it in a format like 20191028.

I used string(${field_0}+${field_6}+${field_3}). the type for field_0 is date.

Thanks

0 Kudos
DougBrowning
MVP Frequent Contributor

Check out this page for things like  format-date(${WSDateTime},'%H:%M')

https://community.esri.com/groups/survey123/blog/2016/04/17/dates-and-time-in-survey123-for-arcgis 

0 Kudos