User role table text not appearing

Hello I am watching this video on the wappler course https://www.youtube.com/watch?v=I_gRqBQZymk&list=PLUjqTJN3byC9W9UFjsV9f9vefe_ZSFQfb&index=39&ab_channel=Wappler
My user role text is not appearing for the rolename and role. I don’t know what is wrong I believe I added everything correctly. I also paused and restarted the server incase that was an error. here are some photos

Hello!

Don’t use role.*
Just add them one by one
Also how looks your join table?
And lastly, I highly recommend to not use the same field name on tables, in this case role is on both tables.

It’s better to have it like field_table, in this case: role_role and role_authroles

It is still not working. I went back and added the roles one by one. I also changed the ‘role’ name in authrole to avoid confusion. Here is a screenshot of my join authroles table

Actually I’m talking about this:

Here is a screenshot of it

Check the columns, are you sure is role and not rolename? Rolename are capital leters?

What are you actually trying do achieve as what you are doing makes no sense to me. Normally roles are linked to users via their user_id

Please explain in words what you are trying to achieve here and why?

Just being curious,
I think he is trying to retrieve a query of roles where the condition user_id = $_GET.userid
Is it a bad practice to do it in that way?

That would make more sense franse, but his query does not even reference the user table.
In a public environment I would always recommend referencing user id via the security provider but this appears to be in a admin environment when an admin can check/add/remove persisting (via roles).
Not near computer but will check course source and see what is going wrong tomorrow

Yes role names should be capital letters. Thats how it was done in the video. I’m just trying to make a table to edit all users and admins role from the admin panel. I’m watching this video right now and its about 10 mins in: https://www.youtube.com/watch?v=I_gRqBQZymk&list=PLUjqTJN3byC9W9UFjsV9f9vefe_ZSFQfb&index=39&ab_channel=Wappler
I’m still having the same issues. I’ve played around with it and something is still wrong

Im going to start this part over and recreate another dynamic model. I will let you know how it goes

I think this is where the issue is happening. Why is my admin/user information not appear here in the body? Do I need to add it to the footer? I this is why the user roles is blank when I hit the button because the main body is not appearing on my screen here. as you can see you can’t see btn1 or btn2 on the screen

here is a screen recording to better explain. Notice how you can’t see the cells within the body including all three buttons. However, you can only see the header boxes and the footer boxes. https://recordit.co/VUhF56bEw2

because notice

how you can see the body and the buttons/user information here in the page but then when you click the yellow button nothing appears in the user roles field where it should be

Hey Joseph, can you be more specific on what do you need?
We can see the button, but not how it works.
Please show us your apis, how do you call them etc.

The problem is the role table?

I don’t know if this is what you need,
There’s a lot of way to achieve this, here is one of them.
I hope this explanation can help you to figure it out what is missing in your project, but I recomend you to follow Brian’s tutorial.
Lets say we have 3 tables here:

  1. Users
    image
  2. Roles (That define the role of each user) (You can see each user has a different role)
    image
  3. A table that contains the names of the roles:
    image

Server side:

  1. I have a list of all users in one api called listusers:

  2. Then I have another API that has a GET parameter called user (because we need to send the user that we need to check in that query) called roles

  3. The query looks like this:



Client side:

I have 2 server connects

  1. The one which list the users
    image
  2. The one that gives me the role info (You can see the parameter, but we don’t need it now):
    Please note to set it on no auto load
  3. We have a bootstrap table on the page
  4. And another table inside a modal that has no data now because we didn’t send the user and it hasn’t load (remember the no auto load function)
  5. I created a cell and a button on the users table that has this configuration:
  1. I select the user from the table
  2. And show the modal:

Results:

Again, I don’t know if this is the best way, please follow what the tutorial says.
I made this just to help you, maybe watching this you can figure it out what is missing :slight_smile:

1 Like

I just figured it out and fixed it. Unfortunately I had to go back and restart by just creating a new page but it works now. I think I had the role and rolename entries backwards. I am just happy that it is working now. Thank you as always for the help :slight_smile:

1 Like