Alternative to ADD-LIKE-COLUMN

Kladkul

Member
Hey all,

I'm working on a project and one of the tasks I'm looking into is adding a field to a browser thats from a database. It's pretty simple to implement since it's a new field that was added to the table that the program is already using.

The problem is, the new field is a logical and it's showing up as true/false in the browser. Is there anyway to make it show as yes/no?

Currently for adding this record to the temp-table I'm using I'm doing something like this:
Code:
hdl-test-tbl:ADD-LIKE-COLUMN(hdl-buffer:BUFFER-FIELD("t-item")). 
hdl-test-tbl:ADD-LIKE-COLUMN(hdl-buffer:BUFFER-FIELD("t-cost")). 
[B]hdl-test-tbl:ADD-LIKE-COLUMN(hdl-buffer:BUFFER-FIELD("t-new-field")).[/B]
 

Kladkul

Member
I tried that, didn't work. I've been toying with a few different ways to format it with no luck so far.
 

Kladkul

Member
Here's the error I got:

Invalid datatype for argument to method 'ADD-LIKE-COLUMN'. Expecting 'handle' (5442)

I've tried to add the LOGICAL function around it too. I'm really stumped on this one.
 

lord_icon

Member
It SHOULD work though head scratching why not.
There are 2 options for setting this. At display time, using the required with format, which does not seem to be working. Or setting this at session level. Where you are executing prowin, supplying / setting the parameters for this. Hope you solve the issue.
 

TomBascom

Curmudgeon
What version of Progress are you using?

Chained attributes & methods, a:b:c:d():e, is a fairly recent addition. In older releases you had to do it in steps using intermediate variables.
 

Kladkul

Member
I'm using OE 101.B. I've used chain attr and methods in my code before, here is what I coded just incase I missed something:
Code:
hdl-test-tbl:ADD-LIKE-COLUMN(hdl-buffer:BUFFER-FIELD("t-new-field"):FORMAT = "yes/no").
 

Casper

ProgressTalk.com Moderator
Staff member
You must set the format on the temp-tabe field.

hdl-buffer:BUFFER-FIELD("t-new-field"):format = "something/nothing""

when you create the temp-table.
add-like-column expects a handle and therefore you get the error.
 
Top