Solved

Sorting on display value

Posted on 2006-07-10
2
295 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
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
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 connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now