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
alijeyan
Messages: 180
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
Littlefoot
Messages: 20901
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: Trimming spaces
Next Topic: Tab canvas
Goto Forum:
  


Current Time: Sat Dec 10 04:52:33 CST 2016

Total time taken to generate the page: 0.10619 seconds