Can I filter DDDW values out of itself?

Can I filter DDDW values out of itself?

Question:
I have a tabular DataWindow with a DDDW. Can I filter the dddw to include only valuesthat have NOT already been selected ?

Answer:
There is a short, a long and a longer answer to this question. The shortanswer is no. The long answer is that it depends on what your drop-downDataWindow looks like.

Let me give you some background information:

The problem with DDDWs is that the same data buffer is used to displaythe data for each row of the parent DataWindow. This is great forkeeping memory usage low, and 95 percent of the time is exactly what you want.

If you are filtering a DDDW with a single parent row of data you do nothave any problems. The problem comes when you have many rows and eachrow needs a slightly different view of the data. Because the data bufferis shared between the row, whenever you change one row you change themall.

Although your users can edit only a single row at any given time,whenever you update the primary buffer of the DDDW, PowerBuilder repaintsall of the views of that data buffer. This is exactly the same concept asthe ShareData command.

Because the DDDWs are repainted when you filter the data, any otherrows are repainted. Thus if your drop-down list box is showing a nicetextual version of a code table, when you filter the rows and removethe already used rows out of the data set, the textual version ofthe other rows is gone and is replaced with the code!

So the long answer is that if you are not displaying textualdescriptions and code only, it will work.

The longest answer is that you can write a lot of code and basically fakethe missing DDDWs. Have an empty text column on your data window andmake it the same size as the DDDW. When your users tab into the DDDW, letthem use it as normal. When they tab out, find out what theyselected and look up the text out of the DDDW. Then put the text in yourdummy column and move the dummy column over the top of the DDDW. Whenthey tab into the DDDW, move the text field out of the way. This willtake an hour or so of coding and testing but will give you the desiredeffect. The commands to look at are GetChild, SetFilter and Filter,as well as the itemfocuschanged event. To add a dummy column, just add “” to the end of your SQL statement.

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes