Data Table - predefined save field

Hi,
I have accidentally let the Plumsail forms to select its predefined column to save data from Data Table:

I need to work now with these data and cannot find this field, or how to access them?
Now, I cannot choose different column for saving data because people have been working on it, and they will not be able to find their selected values - choosing a new column would mean removing the connection between list item and dataTable.
Can you help me with this out?
Thank you
Steo

Hello @Stepan,

The designer creates hidden fields by default. You can make it visible programmatically by changing this property:

Here are some examples on how to achieve this with JS:
https://social.msdn.microsoft.com/Forums/en-US/4f1d4224-8749-4a5b-9889-03c20bea2d09/hide-fields-in-task-list-javascript?forum=sharepointdevelopment

If you need help with the code, we can offer paid support. Please email us at [email protected] for more details.

Hi @mnikitina ,
can I access it via Plumsail Forms with Javascript?
What I need is - when someone fill in the DataTable with data, after save I want to access this field and save only some data from one column.
I do not need the column to be seen in the list view or in the form.
Thank you, Steo

@Stepan,

Could you please describe the whole use case so I could offer the best solution for you.

@mnikitina , Thank you.

  1. People fill in the datatable like this:
    1st Row
    columns:
  • Name of product
  • Price
  • Quantity

2nd Row
columns:

  • Name of product
  • Price
  • Quantity

Always the same - but the data table can hold up to 10 items or more, it does not matter for this case.
After they fill all the data they need in the form, I need to take the first column (all strings) "Name of Product" and save it somewhere, let's say to another field named "Chosen products" and stored products should look like this:
Data field name: Chosen products (multiline of text)
Filled in data - Bread, Eggs, Ham, Spaghetti

Have I described that clearly?
Thank you,
Steo

@Stepan,

Thank you for more details!

You can save column values as a string to any other field using the code:

fd.spBeforeSave(function(spForm) {
    const product = [];
    fd.control('DataTable1').value.forEach(element =>
        product.push(element.Column1)
    )
    fd.field('Title').value = product.join(', ')
});
1 Like

Perfect! :slight_smile:
It works great.

1 Like