Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
At this point, our Admin User List page is complete. We have a table with all of our members' information being printed out into it. We made the user ID a hyperlink. Attached to that hyperlink, we have added some information, the user ID for each number. Now, what we plan to do is take that user ID information that's being passed to this page and query the database for that specific user's information.
So, we need to build a record set on the Admin User Update page. And that record set is going to take query string, use the user ID from it, and query the database for just that users information. I will move out to the Bindings tab, click the plus sign, we need a query built to query for only the one member's information that was chosen from our user list.
Well, let's call this one qMemberDetails. We only have one connection we're using. So, that is the connection we will use. The table will be the log in table. And the information we need is everything within that table, including the user ID. Now, here is the new section. Within this query, we are going to filter the query data, based on the user ID. So, we're going to pull the data for one user, using their user ID as an identifier.
And that user ID is going to be equal to the user ID information we passed in our query strength. So, we choose URL Parameter. We're only pulling out one member's information, so we don't need to sort in anyway. Now, let's test this. In order to test this query, we need to pass in a user ID. Now, I specifically have five users in my query information. You may only have four, if you did not add a new user within that Admin Insert New User interface.
So, you don't want to put a number higher than four here, or you won't get any details. So, I'm going to use a user ID of three as my test. I will click OK and here is user number three. So, we know the data is being pulled out correctly. You can see user three does not have first name, last name or country information listed. So, we can update his information using this form. Now that we have the form information setup, our form is all set. We need to place this information into the form itself. So, how do I do that? Well, I'm going to take first name and drag that into the first name area of the form.
Last name will go into last name. Country, and make sure you choose that field before you do this, to make sure it goes in. Country will go into the country area. Now, our email address is actually the username. I am going to select this first, to make sure that I get the correct field. Password is going to go into the password area. And our role or guest, this information, I'll do this one just a little bit different.
There are a few different ways to set these up when you are doing these bindings. For this form field, I'll do it in another manner. I will select the menu. Now that I have that menu down in my Properties area, instead of dragging out into that menu, I can click the Dynamic button. We have our record set setup, so within the Dynamic area, here is my menu, here are the static options available. What I'm going to do is choose the option from the query. And the value is going to be user ID as well as the label. Now, we're going to select the value equal to, I'll click over here. Whatever the role is for the user presently.
So, there is my menu. And it should show the role for the user as it is now. Let's click OK. Save the page, and I need to go back to the user list, in order to test this process. So, we'll open up the browser. I will Paste that in, type out the password, which is candice, lower case, at least for now. Click Log In. Here is my table. I can take John. We saw user ID was empty in these three areas.
I will click John. And there is John's information being populated into our form. Now, I do have a tour ID being listed in here as a role. And that isn't exactly what I wanted. So, we can go back and fix that. But John, at present, is a guest. If I click this Update User Details button, nothing is going to happen. But at least we have our form populating with John's information.
We do need to fix that drop down in our role area. But we have John's information being passed from our listing in our table, to this page. And this page is actually populating the form with that specific user's information. We will correct the role piece, and we also need to get this button activated, to actually update his information, if we modify it here. So, that's the last piece of this process we need to put together.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 101622 Viewers
61 Video lessons · 88377 Viewers
71 Video lessons · 72218 Viewers
56 Video lessons · 103969 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.