Home » Developer & Programmer » Forms » Clearing the Lines Block (Froms 6i)
Clearing the Lines Block [message #410463] Sat, 27 June 2009 03:07 Go to next message
kittu915
Messages: 51
Registered: February 2006
Location: Hyderabad,India
Member
Hi There,

I need small help please.

I have designed a form and registered in apps 11i.

it has headers and lines parts.

In headers user will select some customer and its site. and enters lines(ex: Sales orders)
which depends on the customer and site selected above in headers.

he enters everything and saves it.

and later he comes back and query the same . and enters diff customer and site... then i need
to clear the whole lines block. As soon as user changes the customer i need to clear the
lines block.

I have used APP_FIELD.CLEAR_FIELDS API in when-validate-item of customer in the headers block.
but it was clearging the first record of the lines block only. I need to clear all the records
of the lines block.

Thanks,
Kittu.
Re: Clearing the Lines Block [message #410505 is a reply to message #410463] Sat, 27 June 2009 13:45 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't know Oracle Applications, but - as you've posted the question in Forms forum, perhaps it'll help: can you not use the CLEAR_BLOCK Forms built-in?

Moreover, your "header and lines" design smells like master-detail. If that's so, then there's a possibility that you don't have to do anything but properly set master-detail relationship - Forms will do the rest.
Re: Clearing the Lines Block [message #410597 is a reply to message #410505] Mon, 29 June 2009 03:50 Go to previous messageGo to next message
kittu915
Messages: 51
Registered: February 2006
Location: Hyderabad,India
Member
Hi Littlefoot,
Thanks for the reply.
I think for CLEAR_BLOCK... this will clears the present block....
But when i chnage in the header block lines block has to be cleared.
Yes this is the master-detail form only... but the joining is like some unique value ex: header_id....
That will not clear the things...

Thanks,
Kittu.
Re: Clearing the Lines Block [message #410601 is a reply to message #410597] Mon, 29 June 2009 04:05 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Quote:
I think for CLEAR_BLOCK... this will clears the present block....
Go to the lines block and clear it.
What is the issue with that?

By
Vamsi
Re: Clearing the Lines Block [message #410621 is a reply to message #410601] Mon, 29 June 2009 05:10 Go to previous messageGo to next message
kittu915
Messages: 51
Registered: February 2006
Location: Hyderabad,India
Member
Hi Vamsi,
Thanks for the reply.
When i write code in the headers block's item's validation trigger : go_block(lines_block) and clear block.Was giving error.
Thing is when i have the data entered in the headers ans lines... if i change i item in the headers... then whole lines have to be cleared.

Am new to Forms...


Kittu.
Re: Clearing the Lines Block [message #410625 is a reply to message #410621] Mon, 29 June 2009 05:37 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Restricted procedures (read about them in Forms Online Help system) can not be called from the WHEN-VALIDATE-ITEM trigger.

Once again: if master-detail relationship is correctly set, Forms engine will do the job by itself - no additional coding is required.
Re: Clearing the Lines Block [message #410939 is a reply to message #410625] Wed, 01 July 2009 02:10 Go to previous messageGo to next message
kittu915
Messages: 51
Registered: February 2006
Location: Hyderabad,India
Member
Hi Littlefoot,
I did setup the relation with a common colun i.e header_id.
But my requirement wasn't fulfilled.

Thanks,
Kittu.
Re: Clearing the Lines Block [message #411080 is a reply to message #410939] Wed, 01 July 2009 18:43 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Please tell us again which part of the standard master-detail behaviour is not to your requirement. Don't just cut and paste from your first post but give us a detailed example.

David
Re: Clearing the Lines Block [message #411477 is a reply to message #411080] Sat, 04 July 2009 03:30 Go to previous messageGo to next message
kittu915
Messages: 51
Registered: February 2006
Location: Hyderabad,India
Member
Thanks fro reply David...

Thing is when i have the data entered in the headers and lines and save the form one number will generate... if i close the form and later i query the form with the same number generated previusly...ok... and if i change the value of one item in the headers... then whole lines have to be cleared.

Please help.

Kittu.
Re: Clearing the Lines Block [message #412351 is a reply to message #411477] Wed, 08 July 2009 18:34 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Not good enough! Give an example use real numbers and values. And please use 'code' tags to get the alignment correct.

David
Re: Clearing the Lines Block [message #413338 is a reply to message #412351] Wed, 15 July 2009 05:14 Go to previous messageGo to next message
kittu915
Messages: 51
Registered: February 2006
Location: Hyderabad,India
Member
David Please find my fmb file attached.
And also please let me know am i doing any mistake this this.
Am new to forms.... thats my problem.

Thanks,
Krishna.
Re: Clearing the Lines Block [message #414221 is a reply to message #413338] Tue, 21 July 2009 01:35 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I there a function/procedure APP_FIELD.CLEAR_BLOCK?

David
Previous Topic: block text item
Next Topic: how can we make tree in oracle form?
Goto Forum:
  


Current Time: Sat Dec 10 22:20:07 CST 2016

Total time taken to generate the page: 0.09700 seconds