I have added reference fields for two of my fields in my collection and having the same problem. Looks good in sandbox however when sync with live data selected items are not updating.
It’s be cause let’s say collection A is linked to B and C, so collection A is synced but B and/or C is are not.
My main collection with the field languages is only referenced to a collection with the languages. Same as My Skills.
[@charlesbellsr] Hi Charles. I think what [@carlosgalvarez] is suggesting is that you need to synchronize all of the data collections to live. Make sure you synchronize the referenced data collections first then the one you are having problems with.
If that fails please post the url of the site you are having problems with.
Cheers
Steve
Thanks Steve and @carlosgalvarez] that fixed it. Now i have another problem. How do i get my dropdown on my input page to connect to the field with the multi selections in it?
[@charlesbellsr] Canbyou explain what you are trying to accomplish. If you have a multiple reference field you probably cannot connect it via the Wix Editor as the settings box looks for a text field in a specific reference not a multi reference field. If you want to use the references as the list to connect your dropdown to then that will require you to get the reference list from the data collection first using the appropriate query and then assigning the array that should be returned in the “mySkills” property. But at this point you need to be more clear about what you need in the drop down.
Cheers
Steve, my main collection is called candidates and I have a field in it called Languages. I have another collection called Languages that I have a reference from languages in the candidates collection to Languages in the languages collection. I have a members page where the member can tag the languages spoken associated with them so it can be updated in the candidate collection. I have two datasets on the member page attached to candidates collection and languages collection. I added a dropdown on the members page to allow the member the ability to select all languages associated with member. When adding the dropdown it allowed me to connect to candidates dataset however the value connect did not show the language field (reference field) in the candidates collection. I also selected the connect dropdown list and connected to the language dataset and the language field. The dropdown shows the languages however my problem is how to select multi and have them populated in the language field. I have the need of several of these type of boxes on my members page. Such as My Skills.
@charlesbellsr Hi Charles:
OK You cannot use multi reference fields with datasets. Datasets do not fetch these fields in the current API. The only way you can access multi-reference fields is using the wix-data API. There are two ways to do this:
- Using the queryReferenced() function
$w('#dataset6').onReady(() => {
let currentUser = $w('#dataset6').getCurrentItem();
console.log(currentUser);
wixData.queryReferenced("Candidate", currentUser._id, 'languages')
.then((results) => {
console.log(results);
})
});
- Using the query() function with include()
$w('#dataset6').onReady(() => {
let currentUser = $w('#dataset6').getCurrentItem();
console.log(currentUser);
wixData.query("Candidate")
.eq('_id', currentUser._id)
.include('languages')
.find()
.then((results) => {
console.log(results.item[0].languages);
})
});
Another way is to create your own “join” collection that contains a reference to the languages data collection and a reference to the candidate collection. Then when you load the candidate information you can filter the join collection by candidate id thus showing all languages for that candidate.
You will need to create a separate languages spoken table or repeater that shows the languages in the list (which presumably you will need to do anyway). Perhaps this is something you could do in a lightbox popup? Depends on how much code you really feel like writing.
Cheers
Steve
Hi everyone
I have 3 collections one is Showcast collection and another People & CastRoles collections.
How to submit form ?
in this user inputs connected to not visible[value not connected].i am using on click event with through corvid coding used.
- i am creating reference fields in showcast collection .how to submit form with two reference fields.expect showid textbox remaining 2 user inputs reference fields.those three user inputs conncets to showcast dataset .but reference fields are not visible to conncets to daatset its not possible how to solve this issue.i am trying insert reference [ https://www.wix.com/corvid/reference/wix-data.html#insertReference ] i am getting error is “reference is broken”.
please give any suggestions or send me any examples like screenshots on that issue related. Thank you.