Select to view content in your preferred language

Get 3 attributes into 1attribute column in final data model

297
2
Jump to solution
05-30-2023 12:15 PM
dwold
by
Occasional Contributor III

I have three attribute fields and I am trying to populate them into one field in the final data model. The goal is to clean up the export table from 3 columns to one when I am collecting the same information for all three entries. However, they are being captured differently in the survey. One is an integer value input and the other 2 are calculated fields.

I'd like to get : target_value_numeric, calculated_target_value, calculated_unemployed_target_value to one field say final_target_value

What is the best process to do so?

dwold_0-1685474095338.png

@DougBrowning 

@ZacharySutherby 

@BarbaraWebster1 

@jcarlson 

0 Kudos
1 Solution

Accepted Solutions
IsmaelChivite
Esri Notable Contributor

A few things that may help:

  • You can use the concat() function to concatenate multiple strings/numbers together. For example:

concat(${textQuestion}, " ", ${calculateQuestion}, " ", ${integerQuestion})

  • Note question types do not need a value in the name column. Keep the name empty in your note question and you will save a field in the feature layer. If you have published the survey already, the field will remain, but you can delete the field.  

IsmaelChivite_0-1685547534044.png

  • If you set the value of bind::esriFieldType to null, your question will not have a corresponding field in the feature layer when you publish the survey.  Again, if you have published your survey already, it is too late to set this value, but you could remove the field from your layer.

IsmaelChivite_1-1685547716250.png

  • The coalesce() function may be useful too. It takes two values and returns the first one that is not empty.

coalesce(${question1},${question2})

coalesce(${question1},coalesce($question2},${question3}))

View solution in original post

2 Replies
IsmaelChivite
Esri Notable Contributor

A few things that may help:

  • You can use the concat() function to concatenate multiple strings/numbers together. For example:

concat(${textQuestion}, " ", ${calculateQuestion}, " ", ${integerQuestion})

  • Note question types do not need a value in the name column. Keep the name empty in your note question and you will save a field in the feature layer. If you have published the survey already, the field will remain, but you can delete the field.  

IsmaelChivite_0-1685547534044.png

  • If you set the value of bind::esriFieldType to null, your question will not have a corresponding field in the feature layer when you publish the survey.  Again, if you have published your survey already, it is too late to set this value, but you could remove the field from your layer.

IsmaelChivite_1-1685547716250.png

  • The coalesce() function may be useful too. It takes two values and returns the first one that is not empty.

coalesce(${question1},${question2})

coalesce(${question1},coalesce($question2},${question3}))

dwold
by
Occasional Contributor III

@IsmaelChivite the coalesce function worked perfectly! Thank you for the tip, I greatly appreciate it!