Home » Developer & Programmer » Forms » How to set Item Value (Forms 6i)
How to set Item Value [message #305171] Sun, 09 March 2008 23:32 Go to next message
Messages: 183
Registered: January 2007
Location: IRAN
Senior Member
Hi All

I want set Item Value in a data Block at runtime with Item Name . Item names are save in a table and i want set Item value with that names .

Regard Ali
Re: How to set Item Value [message #305228 is a reply to message #305171] Mon, 10 March 2008 03:33 Go to previous message
Messages: 21148
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
In other words: if there's a form created on the 'DEPT' table in Scott's schema, you'd have three items in a data block: 'deptno', 'dname' and 'loc'.

During runtime, you'd like to set 'deptno' item's value to "deptno", 'dname' ones to "dname" and 'loc' to be "loc". Right?

Something like this?
:dept.deptno := 'deptno';
:dept.dname := 'dname';
:dept.loc := 'loc';

These values are stored in a table. How does this table look like? Obviously, you'll need to use some kind of a SELECT statement to do that, as
SELECT col1, col2, col3
  INTO :dept.deptno, :dept.dname, :dept.loc
  FROM your_table;
How do you know which names are stored into which columns? What will you do when item type is a NUMBER (for example, 'deptno')? How will you store a STRING 'deptno' into a numeric item?

BTW, what are you trying to do?
Previous Topic: how to change the value of Record Group at run time
Next Topic: edit
Goto Forum:

Current Time: Sun Aug 20 03:01:20 CDT 2017

Total time taken to generate the page: 0.07547 seconds