Alpha Video Training
Results 1 to 5 of 5

Thread: UX List Computed Column

  1. #1
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,629

    Default UX List Computed Column

    The list allows you to create a "computed" column.

    But I need that total saved to the db.

    So, we have:

    data.Ext = data.Qty * data.Rate

    That's nice but the actual field is called "Extension".

    How do I get data.Ext into Extension?

    Please don't tell me to use a trigger - there are reasons not to.

  2. #2
    "Certified" Alphaholic
    Real Name
    Frank Bicknell
    Join Date
    Feb 2010
    Location
    39.1915° N, 84.4348° W
    Posts
    2,467

    Default Re: UX List Computed Column

    Are you sure you want to save that data? It is always available as a query (Qty * Rate) as Extension. That way you don't have to worry about data getting out of sync. I used to do that until someone on this board pointed out that that was waste of resources and I realized he was right. Anyhow, if you have to I guess you could set the value of the hidden field Extension (client side) in the onChange event of the computed column.
    Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

  3. #3
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,629

    Default Re: UX List Computed Column

    Well, the onChange event is JavaScript so that would mean an Ajax callback, so I guess not.

    But if you know of a way to get the value from the virtual column, that would work.

  4. #4
    "Certified" Alphaholic
    Real Name
    Frank Bicknell
    Join Date
    Feb 2010
    Location
    39.1915° N, 84.4348° W
    Posts
    2,467

    Default Re: UX List Computed Column

    I am assuming you are editing the data. In the detail view then you can use the onChange event of the Qty and Rate fields.

    Code:
    var nQty = {dialog.Object}.getValue('Qty');
    var nRate = {dialog.Object}.getValue('Rate');
    var nExt = nQty * nRate;
    
    {dialog.Object}.setValue('Extension',nExt);
    Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

  5. #5
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,629

    Default Re: UX List Computed Column

    Frank, I think the obvious escapes me. Thanks

Similar Threads

  1. List - computed columns using data from previous row
    By cezar in forum Mobile & Browser Applications
    Replies: 9
    Last Post: 01-15-2015, 01:02 PM
  2. List - computed columns field - how to hide/show
    By JPMPA in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 10-03-2014, 05:20 PM
  3. MSSQL Computed Column Conundrum Unique Record Number Help
    By -Jinx- in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 03-19-2014, 04:38 PM
  4. Form List Box Computed Field Fill
    By Paul Main in forum Alpha Five Version 8
    Replies: 2
    Last Post: 07-20-2008, 08:45 AM
  5. computed column in grid
    By ravish in forum Application Server Version 8
    Replies: 0
    Last Post: 02-01-2008, 12:01 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
  •