Embbeded Data Not Recorded In Response Using JavaScript | Experience Community
Skip to main content
Question

Embbeded Data Not Recorded In Response Using JavaScript

  • Oct 17, 2026 6:00 AM UTC
  • 2 replies
  • 19 views

Forum|alt.badge.img+1

Hi all,

I use JavaScript to create 3 columns, a drop down list (Option), a text field (Name) and a text field (Score) with 10 rows showing first (can be added to 20 rows). Then I added embedded data - “row_01_option”, “row_01_name” and “row_01_score” for up to 20 rows. However, I couldn’t record the embedded data in the responses. The Javascript link and the embedded data (attached) are below. Does someone know how can I record the embbeded data in the responses? I need it to pass my task. Many thanks.

JavaScript Link:
https://docs.google.com/document/d/17y9R7vC5dzm3H32CTmKs7gI6U-Vwu0IVctdf0iGxJoE/edit?usp=sharing

Regards,
Simon
 

2 replies

lizb311
Level 4 ●●●●
Forum|alt.badge.img+20
  • Level 4 ●●●●
  • Oct 27, 2026 4:45 PM UTC

Hi! I’m not sure if you still need help with this! If you do - can you repost the JS you’re working with? The doc you posted isn’t working anymore (it says it’s been deleted). 


sharathmnair
Level 1 ●
Forum|alt.badge.img+1
  • Level 1 ●
  • Nov 24, 2026 7:35 PM UTC

​@SimonT 

Looks like your Survey Flow fields are set up fine, so the issue is probably either when your JS is saving the values or which setter your layout uses. Make sure you're not saving them inside addOnUnload()—by that point the page is already submitting so nothing gets recorded, so attach a change listener on your question container instead (that way dynamically added rows 11–20 get caught too) or save inside addOnPageSubmit(). Also check your Look & Feel layout: if you're on Classic/Flat layout use setEmbeddedData("row_01_option", val), but if you're on Simple Layout you have to use setJSEmbeddedData("row_01_option", val) which automatically adds that __js_ prefix at the front (just like the __js_test_save field at the bottom of your screenshot, so you'd want to rename your Survey Flow fields to __js_row_01_option etc. and keep that block above your question block).