baanbomb
21st May 2005, 10:52
hi:
now we try to develop one session to print out all field, we have used function rdi.table.column.
for example
rdi.table.column("tiitm001", 12,columnname,domainname,offset,size,dept,type,flag,defaultval)
rdi.table.column("tiitm001", 13,columnname,domainname,offset,size,dept,type,flag,defaultval)
rdi.table.column("tiitm001", NN,columnname,domainname,offset,size,dept,type,flag,defaultval)
rdi.table.column("tiitm001", 99,columnname,domainname,offset,size,dept,type,flag,defaultval)

the return value flag may be 32/40/128/130/64.
how to decide what column is field.

mark_h
23rd May 2005, 23:22
Not sure what you are asking. You provide the column and it returns the name and some other info. Check the wiki on the board for what is in the flag.

baanbomb
24th May 2005, 03:30
sorry ,my english is poor.
what i want to know is that how to check a colucm is a field according to the value of flag returned by function rdi.table.column()
or can you give me a link about rdi?
here is the code:
function store.info()
{
rdi.table("tiitm001",no_key,no_column,int_length,real_length)
for num = 1 to no_column
rdi.table.column("tiitm001",num,columnname,domainname,offset,size,dept,type,flag,defaultval)
if size > 0 and flag > 64 then
actual.num = actual.num +1
tmp_array(actual.num,1) = type
tmp_array(actual.num,2) = offset
tmp_array(actual.num,3) = size
field_array(1,actual.num) = columnname
domain_array(1,actual.num) = domainname
endif
endfor
}

it works fine,i wonder if so in other table

mark_h
24th May 2005, 15:18
Here is a link to the wiki (http://www.baanboard.com/programmers_manual_baanerp_help_functions_runtime_dictionary_information_rdi_table_column). According to it the FLAG variable will be something like DB.FILLED or DB.CHILD.

Hitesh Shah
24th May 2005, 18:54
baanbomb,

All indices and combined fields are treated as table columns of with flag db.chld . U can check in the debugger the column name . Also Refcntd and Refcnu are the columns of table of long type which u may wish to take care separately.

Think the code u wrote will give u the actual column numbers.