Re: Forms 4.5 Problem
Date: 1996/03/26
Message-ID: <4j88ct$4sd_at_berta.dde.dk>#1/1
"David M. Taulbee" <dtaulbee_at_po.michsb.trw.com> writes:
>"Ted M. Troccola" <ttroccol_at_motown.ge.com> wrote:
>>Having some difficulty determining a way to do this (logically).
>>
>>I have a popup window that comes up just before my commit.
>>
>>It will show which tables have been affected by your changes.
>>
>>The idea is that I want the user to see which blocks he
>>has modified before he does the commit.
>>
>>Any ideas how to
>>
>> 1) Cycle through all of the blocks in the form?
>>
>> Currently, since my blocks are all named the same as the
>> table they reflect in the DB, I go through all of the
>> tables who are owned by the current_user. I then
>> Find_Block(each table name);
>>
>> There must be a better way!
Now it is possible to loop through all blocks in the current form, and even all the items as this fragment shows:
block_name := Get_Form_Property( form_name, FIRST_BLOCK );
loop
item_name := Get_Block_Property( block_name, FIRST_ITEM );
loop
item_id := Find_Item( block_name||'.'||item_name ); if not Id_Null( item_id ) then item_name := Get_Item_Property( item_id, NEXTITEM ); exit when item_name is null; end if;
end loop;
-- Do whatever you have to do withe the block!
block_name := Get_Block_Property( block_name, NEXTBLOCK );
exit when block_name is null;
end loop;
Hope this helps - Martin
>>
>> 2) Make a List Item, or NON base table Block that contains
>> this list of "blocks that have been CHANGED"? The problem
>> here is that this list must be populated before the user
>> enters anything on the window. The list will be at the
>> bottom of the data entry area and the user should not
>> be able to modify the data in the list.
>>
>>Thanks,
>>Ted
>>
>>Please cc me an email, in case I miss your posting.
>>--
>>-------------------------------------------------------------------------
>>
>> Ted Troccola Email : ttroccol_at_motown.ge.com
>> troccola_at_vitinc.com
>> Lockheed Martin Phone : (609)722-4721
>> Government Electronic Systems Fax : (609)722-4707
>> 199 Borton Landing Road Dial Comm : 8*224-4721
>> Moorestown, NJ 08057-0927
>>
>>-------------------------------------------------------------------------
>--
>Try storing your forms in the database and then create procedures to >retrieve the block names. I have a series of procedures that I created >for controlling form/block/field access. Here is a couple of cursors that >may assist you. >cursor form_blocks is select scope1 from system.frm45__object > where modid = frmid > and objecttype =3 > and textdata1 like '%'||chr(10)||'1=16'||chr(10)|| > '2=%1=400'||chr(10)||'2=1'||chr(10)||'%' >;
>cursor get_modid is select modid from system.frm45__object > where owner= app_owner and name = cur_frm and objecttype=1;
>David M. Taulbee >TRW Vehicle Safety Systems >dtaulbee_at_po.michsb.trw.comReceived on Tue Mar 26 1996 - 00:00:00 CET