Solved

Highlight Duplicate Data in Sorted Datawindow

Posted on 2006-06-26
2
383 Views
Last Modified: 2013-12-26
Greetings All,

We have a data cleansing project going on.

I would like to create a datawindows that retrieves data either from a database or import the data from a spreadsheet.

I would like to create a computed field to check on the value of one field (employee ID) to see if it is a duplicate.

I plan to sort the datawindow by employee id.

In the computed field or in the backcolor property for employee id, I would like to enter an expression that checks to see if the value of the field in the previous row or the next row is the same.

I don't really know how to refer to another row in a datawindow expression.

So I was thinking that it could be something like:

     if(emp_id = (getrow + 1(emp_id)), rgb(0,0,0),rgb(255,255,255))

What I don't know is how to get the value of emp_id from the next row down.

Can anyone help here.  I would prefer not to have to write a function for this as the datawindows will be throw aways.

Thanks!!

Paul
0
Comment
Question by:pemurray
[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:
batchakamal earned 500 total points
ID: 16985553
Yeah it is simple
Choose all the columns,
Go to the Font properties page,

Write the following in the Background color expression

if(  emp_id  [0] =  emp_id  [1] , rgb(255,0,0), rgb(255,255,255))

Cheers!!!

0
 

Author Comment

by:pemurray
ID: 17010504
Hi Batchakamal,

Perfect Answer!!  Works great.

Now is that stuff undocumented?  I don't ever recall seeing documentation in PB to do something like that.  Actually, I don't even understand how it works.  Is the [0] and [1] an array reference or something else?

Thanks again!!

Paul
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
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 use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

759 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