Distinct Value in screen rules

 4 Replies
 0 Subscribed to this topic
 78 Subscribed to this forum
Sort:
Author
Messages
ARaja
Advanced Member
Posts: 26
Advanced Member

    I have a custom file with three fields in it. All three fields are part of the primary key. I have a selects built that are working but they return all records. Is there a way to return only the distinct list of the first field. So My table has Group, company, and location in it. Currently my selects return every combination in the table. I want to return only a distinct list of group names.

    So instead of
    Group1, company1, location1
    Group1, company1, location2
    Group2, ......

    I want
    Group1
    Group2


    Thanks,
    Alex

    Ragu Raghavan
    Veteran Member
    Posts: 475
    Veteran Member
      Maybe another custom table that just has the one field ? Your select can be based on this new table and just show Group1, Group2....
      ARaja
      Advanced Member
      Posts: 26
      Advanced Member
        Is there any other options without using an additional table.
        Ragu Raghavan
        Veteran Member
        Posts: 475
        Veteran Member
          create an index with a condition (where company = null and location = null)
          Create records with just the group populated and company/location null
          in the Select, refer to this index

          If you have Design Studio, paint a drop-down list and populate the list with whatever values you want.
          ARaja
          Advanced Member
          Posts: 26
          Advanced Member
            The company and the location will have a unique record for the same group.

            Group A will have more than one record for a different company and location combination. And in my drop down i need to display my Group A only once.