Alpha Video Training
Results 1 to 4 of 4

Thread: tenantid does not seem to be mapping properly

  1. #1
    Member
    Real Name
    Gary Coslop
    Join Date
    Sep 2019
    Posts
    35

    Default tenantid does not seem to be mapping properly

    I am having trouble getting Alpha to write the tenantid when it writes information to a table. Just the same, it is not retrieving rows of data based on the tenantid.

    I have 2 databases. One is for user info (including the websecurity tables assigned when setting up web security. The other is for the data. Let’s call them users and data. I then went to AlphaDAO (where I created the table connections) and created 2 new connections with the same names. I selected MultiTenant then the users database. I linked Tenant ID and Session Variable to “tenantid” and I now have 2 other connections called usersmt and datamt. I also have a table called “extendeduserinfo” that has a “userid” and “tenantid” column (among a few other columns).

    Under Web Security I went to “Extended User-info Table” link at the bottom. There, the table name is “extendeduserinfo” and the userid field name is “userid”. I am also using a UX security component template “SecurityFramework-Edit_ExtendedUserInfo.”

    If the Web Security “Security Table Type” (SQL) is set to usersmt, I get an error when it tries to write the websecurity tables. It says “Creating New Web Security Tables Error 0 – Error parsing SQL statement 7 – ‘line 1:1: unexpected token: CREATE’. If I select users (without the mt) it runs fine.

    The paragraph above now has the “users” and not “usersmt” so the tables were created.

    If the “Extended User-info Table” (under Web Security) connection string was usersmt (the new multi-tenant connection), and I publish, refresh, login, and run the UX component, it says “Editing Extended User Information for (login name), however no fields are visible. If I change the connection to users (and not usersmt) it lists every field for that user on the table including tenantid.
    So now I have both security settings set to users because usersmt doesn’t play well with me. Now I have 2 different grids. Grid “nomt” uses the data connection string and Grid “yesmt” uses the datamt connection string. Nomt shows me every row no matter what the tenantid column says. Yesmt shows me nothing no matter if the tenantid column has a name that matches in the “extendedUserInfo” table.

    So now I create a row in each table. Both create, and the tenantid column is blank (not null; just blank) when I look at them in the database. When I view the table again, I get the same result in grid nomt, but in yesmt I get the row I just created, but nothing else. This row has an empty “tenantid” (again, not null; just empty), and the reference table I created has the name “agency” for this login under the tenantid column.

    I hope that all made sense. I am lost and struggling, so help is greatly appreciated. I feel like the answer is simple, and I am overlooking it.
    Last edited by cozzitech; 10-14-2019 at 01:22 PM.

  2. #2
    Member
    Real Name
    Gary Coslop
    Join Date
    Sep 2019
    Posts
    35

    Default Re: tenantid does not seem to be mapping properly

    Only part of the post was visible, so I retyped it.

  3. #3
    Member
    Real Name
    Gary Coslop
    Join Date
    Sep 2019
    Posts
    35

    Default Re: tenantid does not seem to be mapping properly

    I am having trouble getting Alpha to write the tenantid when it writes information to a table. Just the same, it is not retrieving rows of data based on the tenantid.

    I have 2 databases. One is for user info (including the websecurity tables assigned when setting up web security. The other is for the data. Let’s call them users and data. I then went to AlphaDAO (where I created the table connections) and created 2 new connections with the same names. I selected MultiTenant then the users database. I linked Tenant ID and Session Variable to “tenantid” and I now have 2 other connections called usersmt and datamt. I also have a table called “extendeduserinfo” that has a “userid” and “tenantid” column (among a few other columns).

    Under Web Security I went to “Extended User-info Table” link at the bottom. There, the table name is “extendeduserinfo” and the userid field name is “userid”. I am also using a UX security component template “SecurityFramework-Edit_ExtendedUserInfo.”

    If the Web Security “Security Table Type” (SQL) is set to usersmt, I get an error when it tries to write the websecurity tables. It says “Creating New Web Security Tables Error 0 – Error parsing SQL statement 7 – ‘line 1:1: unexpected token: CREATE’. If I select users (without the mt) it runs fine.

    The paragraph above now has the “users” and not “usersmt” so the tables were created.

    If the “Extended User-info Table” (under Web Security) connection string was usersmt (the new multi-tenant connection), and I publish, refresh, login, and run the UX component, it says “Editing Extended User Information for (login name), however no fields are visible. If I change the connection to users (and not usersmt) it lists every field for that user on the table including tenantid.
    So now I have both security settings set to users because usersmt doesn’t play well with me. Now I have 2 different grids. Grid “nomt” uses the data connection string and Grid “yesmt” uses the datamt connection string. Nomt shows me every row no matter what the tenantid column says. Yesmt shows me nothing no matter if the tenantid column has a name that matches in the “extendedUserInfo” table.

    So now I create a row in each table. Both create, and the tenantid column is blank (not null; just blank) when I look at them in the database. When I view the table again, I get the same result in grid nomt, but in yesmt I get the row I just created, but nothing else. This row has an empty “tenantid” (again, not null; just empty), and the reference table I created has the name “agency” for this login under the tenantid column.

    I hope that all made sense. I am lost and struggling, so help is greatly appreciated. I feel like the answer is simple, and I am overlooking it.

  4. #4
    Member
    Real Name
    Gary Coslop
    Join Date
    Sep 2019
    Posts
    35

    Default Re: tenantid does not seem to be mapping properly

    Is anyone able to help?

Similar Threads

  1. How to set the tenantid after a successfull login?
    By JetLi in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 09-27-2019, 11:54 AM
  2. Replies: 2
    Last Post: 08-18-2017, 06:26 PM
  3. look up mapping
    By Conrad Lindes in forum Alpha Five Version 8
    Replies: 0
    Last Post: 10-14-2007, 09:42 AM
  4. Mapping - Two Questions
    By Bob Whitaker in forum UK Users
    Replies: 2
    Last Post: 06-02-2004, 08:03 AM
  5. EDI Mapping
    By Robert Emerick in forum Alpha Five Version 4
    Replies: 8
    Last Post: 06-21-2000, 12:53 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •