Hi Jeff,
as for your first question, if i understood you right, this is a very important feature we are currently working on which is called multi-ref, the concept is as follows:
collection A - users
collection B - choices - a lookup reference which can be pre defined in your case (or not, in other examples)
User a1 can now choose multiple choices of B, and those choices can also be chosen obviously by other users as well. it requires to set up collection C (a relation collection) which will hold 2 things - identification of collection A and identification of collection B for example:
a1, b1
a1, b2
a2, b1
at the moment you can set up a single reference to a lookup table, which does not make sense to use for your need, but multi-ref with the capability to display those multiple items in the dynamic page for each user will solve your need.
as a work around in the meanwhile you can aggregate all those choices in a single comma separated string column, concatenate the values before save, and split them after-read (indeed cumbersome but we are on it
)
as for the second question, as part of our offering on Wix sites, and according to Search engine standard, if you append to your site url path the following “/sitemap.xml”, in your case the publicly available - “https://www.ourozarks.com/Ozarks/sitemap.xml” you will see what we reply to SEO bots when they are asking us which pages are available for your site
Shlomi
Great…and one more question on reference fields.
trying to understand how to integrate member profile with input forms.
Example: Member inputs article via form so it becomes part of database…want a dynamce page that shows the article but also the author bio (but do not want member to have to enter bio everytime). How do you reference those member profile fields to become part of the dynamic page without having to manually enter (admin) as part of the database for each article, or the author having to enter themselves everytime?
I must be missing something, otherwise why would Wix have a member profile and member ID as part of wix code.
Jeff,
each collection record (for example article) also has an additional field which is an id of the user who created that article.
if you also have a collection of users and in their _id field you set the same user id as the id of the author column of the article collection, you can then set up the following:
you will of course, need to manage the users collection, with bio and the relevant info you mentioned
shlomi
The way I understand the reference fields is that Admin has to manually input each field where pulling info from…so no way to have the bio/author info to autofill in coordination with their entry (post so to speak). Basically building a blog of sorts, as just do not like the Wix blog set up (the entry is pretty clumsy for entering text and images (cursor placement is a huge issue in the blogs for before and after photos, I even knowning the issues have to stumble at times unless you write article and then place images. Dynamic pages much better. Thanks much for letting me pick your brain!
Hi Jeff,
Still, there might be some confusion with Reference.
We want just a single collection with users information, such as name, bio etc right?!
So if we change a user bio it in a single place it will affect each post dynamic page he appears on.
In databases this relationship is also called many to one. Meaning, many posts can reference the same user.
If you add a column of type reference from the post collection to the user collection and on form submit add a hook, before insert, to add to the post the reference column of who wrote it (should be hidden on the firm), that would do the trick
Shlomi
Ahh! Did not even think about hook from the input end…was still thinking on the output how to hook! Thanks again and apologize for having you on “speed dial” for my tons of questions!
Want to clarify in my head:
Your statement–
If you add a column of type reference from the post collection to the user collection and on form submit add a hook, before insert, to add to the post the reference column of who wrote it (should be hidden on the firm), that would do the trick
So I would need to add a field column in my articles database, and make it a reference column that references the author database. (will need such column for each of author name, bio info, and photo image, etc that want to be used).
Then in form for posting an article, the submit button will not only place the input fields for the article, but then hook the referenced fields of the Author profile database?
Hi Jeff,
yes exactly, either do it using http://www.wix.com/code/reference/wix-dataset.html#onBeforeSave in the browser form submission, or in the server before the data insert to the db http://www.wix.com/code/reference/wix-data.Hooks.html#beforeInsert
use http://www.wix.com/code/reference/wix-users.html#currentUser, assuming the _id column in your author profile collection is also set by you as the user id, not a random generated id, so it can be used as reference in the articles table
Shlomi
Shlomi,
I am still having issues getting a code set up for the hook for the submit. Is there an example of a full code somewhere?
Shlomi,
If you happen to still be following. I have added also a drop down filter to go along with the onkey box search filter. However, unlike the onkey which allows you to just type back in another search…after you use the drop down, it allows no selecting of another drop down. Thus, you have to refresh your whole page to search again. Did I miss something or mess up part of the code to cause this. https://www.ourozarks.com/search-our-ozarks
My code:
import wixData from “wix-data”;
$w.onReady(() => {
wixData.query (“Category”)
.find()
.then(res => {
let options = [{‘value’: “”, “label”: “All Categories”}];
options.push(…res.items.map(category => {
return {“value”: category.title, “label”: category.title};
}));
$w(“#iCategory”).options = options;
});
});
let lastFilterTitle;
let lastFilterCategory;
let debounceTimer;
export function iTitle_keyPress(event, $w) {
if (debounceTimer) {
clearTimeout(debounceTimer);
debounceTimer = undefined;
}
debounceTimer = setTimeout(() => {
filter($w(“#iTitle”).value, lastFilterCategory);
}, 200);
}
function filter(title, category) {
if (lastFilterTitle !==title || lastFilterCategory !== category) {
let newFilter = wixData.filter();
if (title)
newFilter = newFilter.contains(‘title’, title);
if (category)
newFilter = newFilter.eq(‘category’, category);
$w(“#dataset1”).setFilter(newFilter);
lastFilterTitle = title;
lastFilterCategory = category;
}
}
export function iCategory_change_1(event, $w) {
filter(lastFilterTitle, $w(“#iCategory”).value);
}
Hi Jeff,
it took me a few minuted to spot the bug in what you did, indeed tricky 
the dropdown you have added to the code i sent you is also using the same dataset as the search result. which indeed at the beginning contains all the different options in the collections. however, upon selection you configured it to filter the data set to only contain the results that matches the selected options, which in turn, provide your dropdown with just a single result - the selected one. nice!
so, what you need to do is create another, different dataset in your page which is also based on the same collection, connect the dropdown to the new dataset, and on change keep filtering the first dataset, the one of the repeater results is based on, keeping the new dataset intact.
good luck!
Shlomi
Ok, I have added another dataset…but I get lost at this point as to how to keep filtering the first dataset. Keep my code as set on the query, or am I now missing some code (lost on doing that if so needed).
Have added but now getting no info into the drop down
keep the first 2 lines blank, use only the connect to list. i have checked and it worked 
Wallah…always something simple, but hard to see yourself. Then someone else points it out and you feel like an idiot. LOL Thanks again my friend!
So how confused am I going to get in trying to add even another dropdown filter to this scenario?
Shlomi,
With my drop down search box, there is no rhyme or reason as to how the choices show…I have sorted my database for that field as alpha a to z, but still does nothing to change. Am I missing something as to make that show in alpha order?
https://www.ourozarks.com/search-our-ozarks
I have went back through and deleted all from the database, and reentered for the category field. The a to z sorting or z to a does not work as an alpha sort as one might think, it only sorts via first added to last, or vice versa. So all done according to timing of items added to database. No alpha sorting???
Hi Jeff,
the db collection is sorted just for the development view to be more comfortable, obviously where user data is involved there is no way to predefine the chronological order of the data inserted.
for any other purpose like in your example above, please configure the dataset to be filtered and sorted according to your requirements
you can also write your own wix data query to fill the data in the dropdown, i am not sure if we currently have a ‘distinct’ filter to show any result just once or if it should be released soon.
Shlomi
Shlomi,
One issue I now see with using the dropdown I had set up for Categories is that it repeats category for every database entry…so if I have several enties that have “mill” as category, it shows a category choice for all 3 entries that have mill, and so on. That really defeats the purpose of a filter as you now dig thru hundreds of possibles in the drop down.
Also tried to set up differently by using two text entry filters…but that is not getting anywhere here:
https://www.ourozarks.com/copy-of-search-our-ozarks
Hey Jeff,
i know it is far from perfect, but can you just set the items in the dropdown as a predefined list, and not taken from the actual data? it will be the easiest solution for now.
another solution you can do, is set the categories files as a reference field to a new collection you add named categories, and have your dropdown data set based on that collection
makes sense?
shlomi
Shlomi,
I assume my fix to set as a predefined list has to be done within the code I have set up at this query, but not sure about proceding to do so.
$w.onReady(() => {
wixData.query (“Category”)
.find()
.then(res => {
let options = [{‘value’: “”, “label”: “All Categories”}];
options.push(…res.items.map(category => {
return {“value”: category.title, “label”: category.title};
}));
$w(" #iCategory ").options = options;
});
});
Full code for the page https://www.ourozarks.com/search-our-ozarks :
import wixData from “wix-data”;
$w.onReady(() => {
wixData.query (“Category”)
.find()
.then(res => {
let options = [{‘value’: “”, “label”: “All Categories”}];
options.push(…res.items.map(category => {
return {“value”: category.title, “label”: category.title};
}));
$w(" #iCategory “).options = options;
});
});
let lastFilterTitle;
let lastFilterCategory;
let debounceTimer;
export function iTitle_keyPress(event, $w) {
if (debounceTimer) {
clearTimeout(debounceTimer);
debounceTimer = undefined;
}
debounceTimer = setTimeout(() => {
filter($w(” #iTitle “).value, lastFilterCategory);
}, 200);
}
function filter(title, category) {
if (lastFilterTitle !==title || lastFilterCategory !== category) {
let newFilter = wixData.filter();
if (title)
newFilter = newFilter.contains(‘title’, title);
if (category)
newFilter = newFilter.eq(‘category’, category);
$w(” #dataset1 “).setFilter(newFilter);
lastFilterTitle = title;
lastFilterCategory = category;
}
}
export function iCategory_change_1(event, $w) {
filter(lastFilterTitle, $w(” #iCategory ").value);
}