Alpha Video Training
Results 1 to 10 of 10

Thread: Update Product ID but choose by Product name in a list

  1. #1
    Member
    Real Name
    Jim DeWitt
    Join Date
    Jun 2014
    Posts
    50

    Default Update Product ID but choose by Product name in a list

    Basic I know, I have a table with Product id and Product name, when updating an order I'd like to pick from the Product Name field but update the Product ID in the order table. Stuck here please help thanks...

  2. #2
    Member
    Real Name
    David Hagen-Sørensen
    Join Date
    Jul 2013
    Location
    Denmark - Odense
    Posts
    66

    Default Re: Update Product ID but choose by Product name in a list

    Hi Jim,

    Are you using grid or UX when creating your order?
    You could look into using the lookup property, this is available in both grid and UX. I use this very often to open up a model window where I can choose a text from a different table, but then instead of returning the text I return the id for row in the table and then save this in my field.
    Kind regards
    David H-S

    Using: Alpha Anywhere V12

  3. #3
    Member
    Real Name
    Jim DeWitt
    Join Date
    Jun 2014
    Posts
    50

    Default Re: Update Product ID but choose by Product name in a list

    Using UX, i have a list control populating textbox controls for updating the order. It populates the productid field, I just succeeding in selecting the product id field and using a lookup to choose by product name to change the productid field. What i would like is to see the product name instead of the productID field when selecting to edit in the first place.

  4. #4
    Member
    Real Name
    David Hagen-Sørensen
    Join Date
    Jul 2013
    Location
    Denmark - Odense
    Posts
    66

    Default Re: Update Product ID but choose by Product name in a list

    So if I get you right, lookup is working now when you add a new product from the lookup. But you would like to be able to see the productname in your textbox wheh you have click a product in the list control. Correct?
    If so you can do this in more then one way.
    1. Have the list control pass the productname to a textbox together with the productid, this can be done by relations in your query for the list control. You don't have to show it
    2. You can also use action script lookup and fill in to get the productname by it's productid.
    3. there are still others ways to do this, depending on how your UX is configured but we would properly need some more information's about how your ux is set up. Is it databound etc. or are you just using a list control.
    Kind regards
    David H-S

    Using: Alpha Anywhere V12

  5. #5
    Member
    Real Name
    Jim DeWitt
    Join Date
    Jun 2014
    Posts
    50

    Default Re: Update Product ID but choose by Product name in a list

    thanks for helping!!! I'm getting data from sql, have product name populating the product name field in the ux and product id populating its field. I guess i just want to show the product name field, change it using a look up to the products table browsing the name field but then populating the id field with the product id when i submit it just sends the id field....seems like i'm getting close, I guess I don't know how to choose in one field but have that choice populate the id field which i know i can hide when it's all working...

  6. #6
    Member
    Real Name
    Jim DeWitt
    Join Date
    Jun 2014
    Posts
    50

    Default Re: Update Product ID but choose by Product name in a list

    Got it! in product name filed, look up, edit-combo list , definitions click to edit, fill in fields.....

  7. #7
    Member
    Real Name
    David Hagen-Sørensen
    Join Date
    Jul 2013
    Location
    Denmark - Odense
    Posts
    66

    Default Re: Update Product ID but choose by Product name in a list

    Yes, this is the way I do it also. I choose from a text by using lookup, but then I fill in maybe more text fields in my UX with data from the lookup.
    When I have an ID field, I hide it if there is no reason to show the information to the user. But with lookup, you can still fill hidden fields also.

    In your cause, where you are working with orders, you are properly only interested in saving the productId in a many-to-many link table and nothing more.
    But the user needs to see products name, Product orderNo, Manufacturer etc. These data are maybe in your products table. So you could still fill these in by the lookup, and if you don't need to save them, have the fields be read only or make the field not update able.
    Kind regards
    David H-S

    Using: Alpha Anywhere V12

  8. #8
    Member
    Real Name
    David Hagen-Sørensen
    Join Date
    Jul 2013
    Location
    Denmark - Odense
    Posts
    66

    Default Re: Update Product ID but choose by Product name in a list

    This might be interesting for you also, seems to do exactly what you are looking for. :-)

    http://alphasoftware.net/alpha-anywh...o-box-control/
    Kind regards
    David H-S

    Using: Alpha Anywhere V12

  9. #9
    Member
    Real Name
    Jim DeWitt
    Join Date
    Jun 2014
    Posts
    50

    Default Re: Update Product ID but choose by Product name in a list

    thanks David, I saw that, looks good but I don't see the option in my version yet, I'll keep on the look out for it...

  10. #10
    Member
    Real Name
    David Hagen-Sørensen
    Join Date
    Jul 2013
    Location
    Denmark - Odense
    Posts
    66

    Default Re: Update Product ID but choose by Product name in a list

    Hi Jim,

    It's in the new prerelease version.
    Kind regards
    David H-S

    Using: Alpha Anywhere V12

Similar Threads

  1. How to automatically Update a value in the same table with same product description
    By JetLi in forum Alpha Five Version 11 - Desktop Applications
    Replies: 4
    Last Post: 07-12-2013, 03:17 AM
  2. Can we do this with this Product
    By Joe LeBlanc in forum Application Server Version 9 - Web/Browser Applications
    Replies: 7
    Last Post: 04-21-2009, 01:27 PM
  3. Blank Product Record Product Creation
    By ryland@rylandwiltshire.co in forum Application Server Version 9 - Web/Browser Applications
    Replies: 4
    Last Post: 03-16-2009, 04:49 PM
  4. Query company product list
    By srodopol in forum Alpha Five Version 8
    Replies: 5
    Last Post: 02-01-2008, 09:24 PM
  5. New Product??
    By crimmelcp in forum Alpha Five Version 4
    Replies: 6
    Last Post: 06-04-2002, 08:07 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
  •