Hello, I have a small query

Hello, I have a small query: I have set up my page for the membership membership according to this video tutorial: 2017 Create Member Profile Log In Page - Custom Private Client Member Dashboard - Wix Code - YouTube I want to modify this code:

 export function profileButton_click(event) {
  wixLocation.to(`/Members/${wixUsers.currentUser.id}`); 
} 

Instead of placing the user ID, I would like to place the following information:

/Members/DNI/Código

I leave the fields and their keys attached. I’m a rookie at Wix Code, I would really appreciate your help. God keep them.

Hi,
Assuming that you got it set up correctly, you need to set add field to the url in the page’s setting.
Check out this article:
https://support.wix.com/en/article/creating-dynamic-page-urls
In the code you need to query the member’s entry and apply it to wixLocation method.

const itemObj = //your member's entry from database collection
wixLocation.to(`/Members/${itemObj.dni}/${itemObj.title}`);

Good luck!
Roi.

Hello Roi, thank you very much for answering. Could I ask you a big favor? I am very new to this. Unless you watch a video or something like that. Could you tell me what data do you need to send you a screenshot and could you complete the code just to put it on? Beforehand thank you very much. I leave attached the capture of what I did, but it did not work, I think it is necessary to fill in a piece of information. The problem is that I do not know which one is haha. I do not speak English, I am using the translator right now