Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Keep existing MRVS rows when dropdown changes and add new ones (no overwrite). Is dynamic column add

skazeez0319
Tera Contributor

I have a Record Producer with:

  • A single-choice dropdown variable (let’s call it u_selector)
  • A Multiple Row Variable Set (MRVS) (let’s call it u_items_mrvs) with a few columns (e.g., item, qty, comments)

What I’m doing now
Using a Catalog Client Script (onChange of u_selector), I populate the MRVS with multiple rows based on the selected value (e.g., selecting “ABC” adds 2–3 rows). This part is working.

My requirement

  • When the user changes the dropdown to another option (e.g., from “ABC” to “XYZ”), the previous MRVS rows should remain, and the new selection’s rows should be added (not overwrite).
  • Ideally:
    1. Add rows in the same MRVS, and mark which dropdown produced the rows, or
    2. Make another MRVS appear and collect rows there (all submitted in a single request).

Questions

  1. Can MRVS add columns dynamically at runtime based on dropdown selection? If not, what’s the best pattern?
  2. How can I merge/append rows into MRVS without wiping existing rows on each onChange?
  3. Is it better to:
    • Use a single MRVS and tag rows with the source selection (e.g., a hidden source column), or
    • Use multiple MRVSs and show/hide them via UI Policies?
  4. Server-side: What’s the cleanest way to consume MRVS JSON on Record Producer submission and map/store it?


0 REPLIES 0