Pulling Custom embedded data | XM Community
Skip to main content
Question

Pulling Custom embedded data

  • July 12, 2023
  • 5 replies
  • 43 views

Forum|alt.badge.img+2

I want to combine 2 embedded data, but one of them is a custom javascript code.

BranchWeek = Brannum_weekNumber

when check the embedded data on question boxes.

first box : ${e://Field/BRANNUM}_${e://Field/weekNumber}

result : brannum_week (this is what i want)

second box : ${e://Field/BranchWeek}

result = brannum_ (the week is missing)

 

Does anyone know how to create BranchWeek?

 

 

5 replies

krbhavya
Level 6 ●●●●●●
Forum|alt.badge.img+20
  • Level 6 ●●●●●●
  • 172 replies
  • July 12, 2023

Hi @Jira_5 

You can use custom code to concatenate the two field and can use the new field as the question 


Forum|alt.badge.img+2
  • Author
  • 1 reply
  • July 12, 2023

Hi Krbhavya,

thank you for responding.

would you mind showing me how to?

I need to use BranchWeek as an embedded data.


krbhavya
Level 6 ●●●●●●
Forum|alt.badge.img+20
  • Level 6 ●●●●●●
  • 172 replies
  • July 12, 2023

Hi @Jira_5 

If you need BranchWeek as embedded data then combining the column in survey flow will work . You have just use '+' operator between the two columns like

BranchWeek = ${e://Field/Column1} +  ${e://Field/Column2}


Naman_Savla
QPN Level 4 ●●●●
Forum|alt.badge.img+9
  • QPN Level 4 ●●●●
  • 37 replies
  • July 12, 2023

Hi @Jira_5 , Your approach is correct. Just checking if you have added these embedded data after the question in which JS is used. 


EmilyErickson
Level 5 ●●●●●
Forum|alt.badge.img+13
  • Level 5 ●●●●●
  • 63 replies
  • July 12, 2023

You can also use the field editor/field creator in Data & Analysis to concatenate which will update historical data if you have it.  When creating it in survey flow, it won’t update surveys already recorded.