Alpha Video Training
Results 1 to 6 of 6

Thread: inserting data into multiple tables(data binding)

  1. #1
    Member
    Real Name
    Amit lohogaonkar
    Join Date
    Mar 2017
    Location
    NJ
    Posts
    428

    Default inserting data into multiple tables(data binding)

    I have register user UX component, I have setup security framework(4 security tables) and bound my register UX to this table. Now I also want the username to go into my players table when a user registers on a site. How do I insert same username in web security users table and my custom players table at the same time?

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,549

    Default Re: inserting data into multiple tables(data binding)

    You should be using the Context.Security object when working with security. Your Registration UX should be bound to your Players table. I feel you have things backwards.

    http://downloads.alphasoftware.com/a....html#Security

  3. #3
    Member
    Real Name
    Amit lohogaonkar
    Join Date
    Mar 2017
    Location
    NJ
    Posts
    428

    Default Re: inserting data into multiple tables(data binding)

    Thanks David. I have out of box login, reset password, forget password and register components from alpha which are bound to 4 security tables. Now I have created one hidden field on change to copy username to username1(to save to my players table) but I am not able to save this additional field to second players table. I do not want to write server side code for login/register as its out of box avaialble, I just need this additional field to get saved into my players table. Please advise(how to insert hidden field into second table once security table is inserted.
    After this
    'To edit this action, place insertion point anywhere in the command, then click the 'Action Scripting' button'.
    ExecuteServerSideAction("Save Web Security Values::SaveSecurity") I want to save the hidden username to my players table and then redirect user to login screen.

    'To edit this action, place insertion point anywhere in the command, then click the 'Action Scripting' button'.
    ExecuteServerSideAction("Save Web Security Values::SaveSecurity")



    dim e.javascript as c
    if rtc.flagWebSecurityhasGlobalError = .T. then
    e.javascript = e.javascript + "alert('"+rtc.WebSecurityGlobalErrorText+"');"
    else
    e.javascript = e.javascript + "alert('account created');"
    after this
    'I want to save hidden username one to players table
    Last edited by amitloh; 07-02-2017 at 04:34 PM.

  4. #4
    Member
    Real Name
    Amit lohogaonkar
    Join Date
    Mar 2017
    Location
    NJ
    Posts
    428

    Default Re: inserting data into multiple tables(data binding)


  5. #5
    Member
    Real Name
    Amit lohogaonkar
    Join Date
    Mar 2017
    Location
    NJ
    Posts
    428

    Default Re: inserting data into multiple tables(data binding)

    I found it!
    I used AA CRUD Operations (CReate, Update, Delete) in an Unbound UX Component
    https://www.youtube.com/watch?v=5iJRQpY0ELU

    Alpha is really flexible..

  6. #6
    "Certified" Alphaholic iRadiate's Avatar
    Real Name
    Stephen
    Join Date
    Jan 2011
    Location
    London, ON
    Posts
    1,560

    Default Re: inserting data into multiple tables(data binding)

    That is really cool Amit, I never realized Alpha had a built in action javascript function for inserting into unbound tables.
    It is really amazing that I have been using Alpha for years yet I am still only finding out about stuff like this now.
    Alpha Anywhere v12.4.6.0.2 Build 5905-5320 IIS v8.5 on Windows Server 2012 in Hyper-V

Similar Threads

  1. Import data into multiple tables at one go(multiple hierarchical grids)
    By amitloh in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 03-26-2017, 09:30 AM
  2. List Control - Binding same data to multiple controls for display purposes?
    By CarlMPearson in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 02-01-2015, 11:15 AM
  3. Replies: 8
    Last Post: 02-12-2007, 02:43 PM
  4. How to use a set to display data from multiple tables
    By first5.0 in forum Alpha Five Version 7
    Replies: 5
    Last Post: 02-23-2006, 12:49 PM
  5. Inserting data from one form into multiple tables
    By Page Sands in forum Alpha Five Version 6
    Replies: 15
    Last Post: 12-22-2004, 09:59 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
  •