?
Solved

Sorting on display value

Posted on 2006-07-10
2
Medium Priority
?
304 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 300 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

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: …
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

650 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