Solved

Sorting on display value

Posted on 2006-07-10
2
300 Views
Last Modified: 2016-01-22
I have a sort functionality on clicking DW headers. There is one column which has code value and display values. When sorting it is sorting on code values, but i need to sort on display values.

Any suggestions??

Thanks in advance
Srinib
0
Comment
Question by:srinib
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
Lordain earned 100 total points
ID: 17076207
The answer most likely lies in the following function;

Description

Obtains the display value in the code table associated with the data value in the specified column.

Syntax

LookUpDisplay ( column )

Argument      Description
column      The column for which you want the code table display value
Return value

String. Returns the display value when it succeeds and the empty string ("") if an error occurs.

Usage

If a column has a code table, a buffer stores a value from the data column of the code table, but the user sees a value from the display column. Use LookUpDisplay to get the value the user sees.
0
 

Expert Comment

by:Greg Mills
ID: 41426858
Hello Lordain,

Do you know if it is possible to use the LookUpDisplay function within a datawindow SetSort function? For instance, dw_v.SetSort("LookUpDisplay(column9) A")?

The sort seems to always use the DataColumn value rather than the DisplayColumn when actually executing the sort. When I add code to the window to view the actual data in the dropdowndatawindow using Describe, it is correct, and I can also use the LookUpDisplay fuction to pull the values from the child dddw and see them in a log file generated when running the window, but the sort seems to ignore the LookUpDisplay function.

Thanks for any advice.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question