SelectionTags are not able to read from dynamicdataset

  1. Im populating Skill SelectionTag from a collection.
  2. Im able to view the selectiontag options on the dynamicpage.
  3. Im able to save/submit selected tag values to the collection.
    ISSUE> selectiontag values not read from the collection,even though collection save the previously submitted values
STEP1)
function populateSkill()
{
wixData.query("skillValues")
        .limit(10)
    //  .ge('orderBy',95)
        .find()
        .then(results => {
            var uniqueList = createUniqueList(results.items);
            $w("#selectionTags1").options = buildOptions(uniqueList);           
        })

    function createUniqueList(items){
        var titlesOnly = items.map(item => item.softSkill);
        titlesOnly.sort();
        return[...new Set(titlesOnly)];
    }

    function buildOptions(uniqueList){
        var uniqueListFinal = uniqueList.map(curr => { return {label:curr, value:curr}; });
        uniqueListFinal.unshift({"label": "Others", "value": "Others"});
        return uniqueListFinal;
    }
}

STEP2

STEP3)


DynamicDataset ( saving selection tag value)

Issue> Options of SelectionTag is not showing on the page


The page has almost 15 - 20 fields, all getting updated and saved correctly except selectionTag.

Any pointer, will be g8tly appreciated
thanx in advance
sneha shah

any pointers…

How are you saving the form with the selection tags? What is the code?

Thanx so much Yisrael, for your kind attention.
Im able to save data of selection tag(dynamically built), >Submit button.
Issue is> Wix is not reading the selection tag value, although data getting saved correctly in the table.

Surprisingly Developer logs are showing>

How are you displaying the selection tags? What code are you using?

No Code, Like all other fields, Im hoping it should be read by wix

As dataset is read-write mode

It won’t automatically refresh when the selection tags are saved. You’ll need code to reread the database so that updated fields are correctly updated on the screen.

oh!.is there a handy code or thread which I can refer for the same…as rest all fields get reflected correctly by wix

I don’t know all of what you are doing, or trying to do, but you might try the following:

You can call the refresh() function after the selection tags are saved to refresh the dataset so that the screen fields will be updated.

hurray…refresh is working…
let me retest…and double confirm

wow! Refresh helped…thanx so much Yisrael
Its working like magic


code added>
 $w('#dynamicDataset').onReady(() => {
        $w("#dynamicDataset").refresh();
    });

regards
sneha shah