Hi all, quick question:
Is it possible to link a row in a collection to a Members Private Page?
I have created a Members Private Page. I want to be able to update it with information I type into a collection that is connected to the page. Each row in the collection will represent a members private page.
Thanks in advance for any help, I am really struggling on this one.
Hello moxy,
if you want to generate something like a custom users-pfofile-page, then it is possible for example with a dynamic-page.
You will have to set it as a dynamic page and connect it to your database.
Then every line of your database will represent a user-profile.
Hi, thanks for the response! I have tried with a Dynamic Page but couldn’t find a way to link each row to the user? I still have the dynamic page and the dataset on my site, do you know how I can link the rows?
Your DYNAMIC-DATASET, will be the key to your solution.
https://www.wix.com/corvid/reference/wix-dataset/dataset/getcurrentitem
$w.onReady( () => {
2 $w("#myDataset").onReady( () => {
3 let itemObj = $w("#myDataset").getCurrentItem();
4
5 } );
6
7} );
8
9/* itemObj:
10 *
11 * {
12 * "_id": "fcec780a-3e37-4b64-8a66-37c552c53f99",
13 * "_owner": "f6c0f9c3-a62d-7e9f-g58d-943829af244d9",
14 * "_createdDate": "2017-05-01T17:19:03.823Z",
15 * "_updatedDate": "2017-05-01T17:19:10.477Z",
16 * "title": "Dr. ",
17 * "name": "B",
18 * "link-dynamic-name": "/myCollection/B"
19 * }
20 */
Okay thank you very much for your help! I will try and apply this to my site. 
Hi there I am struggling to understand what to do with this code? Could you break it down a little further please?
@moxymodelsagency
$w.onReady( () => {
$w("#myDataset").onReady( () => {
let itemObj = $w("#myDataset").getCurrentItem();
console.log(itemObj)
console.log(itemObj._id)
console.log(itemObj._owner)
console.log(itemObj.title)
//...and so on......
});
});
Now take a look into your CONSOLE-OUTPUT!
In Previewmode (on the very bottom of your screen), or pressing F-12 and go to CONSOLE-SECTION (when using google-chrome-browser)
And of course you have to edit …
("#myDataset") <---- to your own DATASET-ID
@russian-dima Im sorry I dont understand.
What I have done:
-
copied the code example
-
changed the names to match my dynamic page name
However I am seeing these error messages. What should I do from here?

@moxymodelsagency
- DO NOT USE PICTURES WHEN SHOWING CODE ! (use CODE-TAGS) you will find them in this menu…

2) When you copy and paste the CODE, make sure, that the CODE has no counting-numbers in each code-line
wrong…
$w.onReady( () => {
2 $w("#myDataset").onReady( () => {
3 let itemObj = $w("#myDataset").getCurrentItem();
4
5 } );
6
7} );
…right …
$w.onReady( () => {
$w("#myDataset").onReady( () => {
let itemObj = $w("#myDataset").getCurrentItem();
} );
} );
- You are sure that you use the DATASET-ID and not the DATASET-NAME ???
EXAMPLE:

DATASET-NAME = “Validation dataset”
DATASET-ID = “dataset1”
In CODE you work ALWAYS with DATASET-ID !
@russian-dima Hi Russian, that was foolish of me! I have corrected the code.
The dynamic page code now looks like this:
$w.onReady( () => {
$w("#mymoxydataset").onReady( () => {
let itemObj = $w("#mymoxydataset").getCurrentItem();
} );
} );
/* itemObj:
*
* {
* "_id": "fcec780a-3e37-4b64-8a66-37c552c53f99",
* "_owner": "f6c0f9c3-a62d-7e9f-g58d-943829af244d9",
* "_createdDate": "2017-05-01T17:19:03.823Z",
* "_updatedDate": "2017-05-01T17:19:10.477Z",
* "title": "Dr. ",
* "name": "B",
* "link-dynamic-name": "/myCollection/B"
* }
*/
Now do I delete the code below ‘/* itemOb;:’ and add my own fields from my collection?
Thanks again for the help!
@moxymodelsagency
The CODE-BELOW ist just the result-log of the code i gave you (which is grom the CORVID-API…
https://www.wix.com/corvid/reference/wix-dataset/dataset/getcurrentitem
If this is not correct…
$w.onReady( () => {
$w("#mymoxydataset").onReady( () => {
let itemObj = $w("#mymoxydataset").getCurrentItem();
} );
} );
…than continue like this…
$w.onReady( () => {
$w("#mymoxydataset").onReady( () => {
let itemObj = $w("#mymoxydataset").getCurrentItem();
// here YOUR CODE !
});
});
$w.onReady( () => {
$w("#mymoxydataset").onReady( () => {
let itemObj = $w("#mymoxydataset").getCurrentItem();
console.log(itemObj)
console.log(itemObj._id)
console.log(itemObj._owner)
console.log(itemObj.title)
});
});
If everything works fine, then you should get some OUTPUT-RESULTS in the CONSOLE.
@russian-dima This is what my console looks like (code below)
connect.facebook.net/en_US/fbevents.js:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
script.crazyegg.com/pages/scripts/0013/2477.js?443627:1 Failed to load resource: the server responded with a status of 410 ()
10A cookie associated with a cross-site resource at <URL> was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at <URL> and <URL>.
maps.googleapis.com/maps-api-v3/api/js/41/8/intl/en_gb/util.js:228 Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
bA.o @ maps.googleapis.com/maps-api-v3/api/js/41/8/intl/en_gb/util.js:228
6A preload for '<URL>' is found, but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute.
6The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
5Unrecognized feature: 'vr'.
2static.parastorage.com/services/document-management/1.3473.0/bolt-ds-adapter/dist/bolt-ds-adapter.min.js:14 createPageAnchors was called and is not implemented
d @ static.parastorage.com/services/document-management/1.3473.0/bolt-ds-adapter/dist/bolt-ds-adapter.min.js:14
/_partials/santa-platform-apps-container/1.476.0/dist/platform-worker.js:1 [CASHIER] onEvent Object
/_partials/santa-platform-apps-container/1.476.0/dist/platform-worker.js:1 developerModeChanged Object
/_partials/santa-platform-apps-container/1.476.0/dist/platform-worker.js:1 [CASHIER] onEvent Object
/_partials/santa-platform-apps-container/1.476.0/dist/platform-worker.js:1 siteWasPublished undefined
privateServices.ts:13 createPageAnchors was called and is not implemented
d @ privateServices.ts:13
/_partials/santa-platform-apps-container/1.476.0/dist/platform-worker.js:1 [CASHIER] onEvent Object
/_partials/santa-platform-apps-container/1.476.0/dist/platform-worker.js:1 siteWasPublished undefined
3privateServices.ts:13 createPageAnchors was called and is not implemented
d @ privateServices.ts:13
/_partials/santa-platform-apps-container/1.476.0/dist/platform-worker.js:1 [CASHIER] onEvent Object
/_partials/santa-platform-apps-container/1.476.0/dist/platform-worker.js:1 siteWasPublished undefined
frog.wix.com/sdk?app_id=14ce28f7-7eb0-3745-22f8-074b0e2401fb&count=1000&evid=12&function_name=heightChanged&instance_id=867a6f03-8c11-4409-a677-8da05c20962f&is_published=1&majorVer=3&msid=809ee3b0-970f-4ab3-bcee-0bed1a63134c&namespace=Wix&origin=viewer¶m=%257B%2522height%2522%253A0%257D&rid&server=wix&site_id=1367acb1-e682-4f78-b607-8af2943b1cde&src=11&ts=110285&ver&viewMode=DESKTOP&visitor_id=61c2fa30-2365-4f82-8c04-98f6205890f1:1 Failed to load resource: net::ERR_CONNECTION_CLOSED
2privateServices.ts:13 createPageAnchors was called and is not implemented
d @ privateServices.ts:13
static.parastorage.com/services/document-management/1.3473.0/bolt-ds-adapter/dist/bolt-ds-adapter.min.js:8 DAL received an invalid pointer Object
static.parastorage.com/services/document-management/1.3473.0/bolt-ds-adapter/dist/bolt-ds-adapter.min.js:8 DAL received an invalid pointer Object
static.parastorage.com/services/document-management/1.3473.0/bolt-ds-adapter/dist/bolt-ds-adapter.min.js:8 DAL received an invalid pointer Object
static.parastorage.com/services/document-management/1.3473.0/bolt-ds-adapter/dist/bolt-ds-adapter.min.js:8 DAL received an invalid pointer Object
static.parastorage.com/unpkg/@sentry/browser@5.15.5/build/bundle.min.js:2 isExperimentEnabled false
www.wix.com/_api/autocms-server/v2/collection-metadata/item/get:1 Failed to load resource: the server responded with a status of 404 (Not Found)
static.parastorage.com/services/document-management/1.3473.0/bolt-ds-adapter/dist/bolt-ds-adapter.min.js:8 DAL received an invalid pointer Object
static.parastorage.com/services/document-management/1.3473.0/bolt-ds-adapter/dist/bolt-ds-adapter.min.js:8 DAL received an invalid pointer Object
static.parastorage.com/services/document-management/1.3473.0/bolt-ds-adapter/dist/bolt-ds-adapter.min.js:8 DAL received an invalid pointer Object
static.parastorage.com/services/document-management/1.3473.0/bolt-ds-adapter/dist/bolt-ds-adapter.min.js:8 DAL received an invalid pointer Object
3DevTools failed to load SourceMap: Could not load content for https://static.parastorage.com/services/wix-ui-santa/1.1289.0/wixcode/wixcode-components.bundle.min.js.map: HTTP error: status code 403, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for https://apps.wix.com/support-chat-widget/main.bundle.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for https://static.parastorage.com/unpkg/ajv@4.8.1/dist/dist/ajv.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for https://editor.wix.com/html/editor/web/renderer/edit/wix-freemuim-css-entry.css.map: HTTP error: status code 400, net::ERR_HTTP_RESPONSE_CODE_FAILURE
@moxymodelsagency
Ok, in this case, it is better when you use the console in PREVIEW-MODE😁
@russian-dima haha okay. Now I am completely lost 
If you want me to add a code snippet I can. (its very very long).
@moxymodelsagency
Yeah i know that you will be completely lost, because you are trying to do something, what is not for beginner
.
When you do not understand your own code, then it gets very hard.
Perhaps you should first understand the given lines here in your starting code, before you continue to code more.
$w.onReady( () => {
$w("#mymoxydataset").onReady( () => {
let itemObj = $w("#mymoxydataset").getCurrentItem();
console.log(itemObj)
console.log(itemObj._id)
console.log(itemObj._owner)
console.log(itemObj.title)
});
});
As you can see you got an ERROR-MESSAGE in line-2.
First solve this. Get first your code to work! Then you can expand it.
It is senseless to continue coding, when code is already BUGGY!