yes it does. any alternative options I can try instead?
if you keep the column as TEXT you use this script:
{{ item.replace(/[{}"]/g, "").split(",") }}
You will need to format the data as {"value1", "value2", etc...}
Don't need to modify anything else
Or if you want to use column as JSON you will need to:
a) in your query use Key value pairs
to use {{ multiselect1.value }}
OR
b) Transform the data from form1.data
and modify the multiselect1
value to return an Array
I tried this with the new column after converting it back to a text and it brings us back to the same issue of where the data is being pulled from the previous product that was worked on. (refer to 10/23 of this thread)
Can you provide screenshots for the JSON option? In the modifyForm query, I already have the key value pair set to {{ modifyProductFormsCombined.value }}
which gets it's values from this transformer (modifyProductFormsCombined:
let modify_required = {{modifyProductForm.data}}
let modify_optional = {{modifyProductForm2.data}}
return {...modify_required,...modify_optional} //combines everything
can you clarify this? some screenshot of the column in the table component and the multiselect might be more helpful
can you answer the following questions?
- Is your table and form in different tabs?
- The multiselect component is showing the same data that was before the update?
e.g.
before: "value1", "value2"
changed to: "value3"
after: "value1", "value2" - is showing the previous data despite other row is selected, or is showing the previous data but the same row still selected?
Created this loom video in hopes of it helping clarify a bit better.
-
Our table exists in a tabbed container in the product inventory application. The form lives in a modal that is triggered when a user selects the modify button
-
Multiselect component shows the same for all products despite there being different data. Seems to not refresh when a new product is selected.
-
the first one. Is showing previous data despite other row is selected.
Keeping the column as TEXT
Replacing the data source of the form from {{ yourTableID.selectedSourceRow }}
to {{ yourTableID.selectedRow }}
may work, since selectedSourceRow
contains the data obtained from the query
But if you have other mapped values in your table could broke othe form fields
e.g.
query returns this
client_id = 1
but in your table you want to display the clients name so you set a mapped value to display it (client name)
by using selectedSourceRow
you get 1 (actual value) but if you use selectedRow
you get client name (mapped value)
If using selectedRow broke anything you can transform the data in your query and apply the JS code in there:
changing from selectedSourceRow
to selectedRow
seems to have worked!
Thank you so much!