Renaming sorted records in table

Discussion in 'Questions (Windows Mobile)' started by aerohost, Jun 24, 2008.

  1. aerohost

    aerohost Member Licensed User

    Hi, I have a TABLE with a NAME column that contains duplicated entries for some records. I want to put the field values of this column into a combo box. The table is sorted on this column so that identical field values are grouped together.

    But, since the combo box doesn't display the selected index properly if there are duplicate values, I need to rename the fields in the table column with something like name-1, name-2, name-3, etc.

    I thought I was losing my mind until I noticed others on this forum had run into the issue discussed elsewhere whereby the table is dynamically re-sorting the records every time a field value is changed. I've had to come up with a complicated slice of code to deal with this, and I'm wondering if there's a simple way to handle this problem.

    I'm thinking this really isn't an unusual thing one might want to do, so perhaps some of you have figured out the easy way? I'm guessing I probably missed something really simple, like I usually do, being a newbie to b4.

    For instance, is there a way to make the table static while I update the fields, then turn on the sorting again? I don't see any command documented around this anywhere.

    Tks, Adrian
  2. Cableguy

    Cableguy Expert Licensed User

    I was under the impression that a table only sorted if wanted....and when wanted...
    To address your case...
    I see, one possible way...
    Re-create an array before sorting, and use the arry index...
    but the ral best would be to avoid duplicates...
    escpecially enter using them to fill a combo...
  3. aerohost

    aerohost Member Licensed User

    Hi Paulo, thanks for that. I thought about using an array, but since a table is a type of array I didn't see the point in using another similar device, but maybe that's what I have to do. I can't avoid duplicates in this column because it is a case where there are multiple orders for the same client.

    Regards, Adrian
  4. aerohost

    aerohost Member Licensed User

    Hi, just FTR, I realized the way to do this is to create a new column that isn't sorted on and create new value of NAME field and put the new value in the matching cell of the same row in the new column.

    Tks, AB
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice