#Multi-select widget not saving correctly to DB

1 messages · Page 1 of 1 (latest)

inner gate
#

Hi! Can you share screenshots of the insert query you are using and also the properties pane of the Multiselect widget?

drifting thunder
#

@inner gate It seems to be working ok just now, Ill keep an eye on it and start another post if it plays up again
Ill see if I can notice a pattern

drifting thunder
#

@inner gate I am still having the problem where some entries are saving with the [] and others are not, when they save without the brackets, it doesnt display correctly when viewing/editing

#

my insert query

#

Properties pane -

drifting thunder
still imp
#

Hey Paul! Let me experiment with this a little.

#

@drifting thunder You should be able to do MyForm.data.Multiselect.toString() to turn the array into a comma separated set of items. Do you need each item to be quoted or can you quote the whole set together for the entry?

drifting thunder
#

@still imp if all items were saved as ["a","b","c"] it be happy. But for some reason it sometimes gets saved as "a","b","c" without thr brackets

still imp
#

Do you want the brackets to be there?

#

If that's the case, you can use "[{{MyForm.data.MultiSelect.toString()}}]"

#

Using a text box for testing, but this is the output of that:

#

It would be helpful to know exactly how you'd like the values to appear in the db 🙂

drifting thunder
#

@still imp if they are saved in the form ["a","b","c"], when I edit the form, the values are displayed in the multi-select box and I can remove or add as required.

If they are saved without the [] then when I edit, the multiselect widget dies not populate

still imp
#

@drifting thunder Is this the only multi-select in your app that works like this or are there more?

#

If you use this '["{{Form1.data.MultiSelect1.join('", "')}}"]' then it will turn the array into this for the query '["GREEN", "BLUE", "RED"]'

drifting thunder
#

I only have one multiselect column

#

Why does it not save in a consistent fashion? I'd have thought that all entries should save in thd same format

still imp
#

I'm not sure about that one. I'll ask the Eng team about this 🙂

drifting thunder
#

Ill keep an eye on it, see if I can spot a pattern

drifting thunder
#

@still imp I have been checking every entry I put and what I have noticed is that the Entry which is saved, saves fine... but occasionally, other entries then have their brackets removed which I am finding quite strange... As the information I am working with is live, I will send you a video via private chat to show what I mean

drifting thunder
#

I have added 3 entries so far and not been able to replicate the issue It doesnt seem to happen all the time which is strange

#

Ideally Id like to take a video but I cant record a video of every entry I add