Link to home
Start Free TrialLog in
Avatar of Anupama Misra
Anupama Misra

asked on

Create a form in which log is created in second block

I am working on forms 6i i have two table one is database block and one is control block i want a approval form in which three radio buttons are created 1 approval 2 back 3 cancel and a table in which check the hierarchy for approval
Avatar of Mark Geerlings
Mark Geerlings
Flag of United States of America image

"I am working on [in] forms 6i."
OK, this much is clear.

"I have two table[s]".
I think you mean: two blocks in your form.

"one is database block and one is control block."
OK, that is fine.  Which table is the database block based on?

"I want [this to be] a[n] approval form in which three radio buttons are created: 1 approval; 2 back; 3 cancel."
OK, these radio buttons can be in the control block.

"a table in which [to] check the hierarchy for approval."
How do you want this table to be related to, or used by your form?
Avatar of Anupama Misra
Anupama Misra

ASKER

I want to relate with two field but we dont want to create master detail
Where is solution
The easiest way to relate two blocks in Oracle Forms is to create a master-detail relationship.  Which features of a master-detail relationship don’t you eat?

Yes, you can relate Oracle Forms blocks manually, but it will involve more programming.
I dont want master detail one block is control block
OK, a two-block form with one block being a database block and the other block being a control (or non-database) block is fine.  I have created many Oracle Forms like that.  What is your question?
I want to popupate records by query and create a log and post a record temporarily commit when user want. I have already said that this is approval form with three hierarchy and three radio buttons A,B,R in first block but it is not database item
I want coding on master detail form manually
1. Populating records by a query in a database block is built-in (or default) functionality in Oracle Forms.  So, that is easy.

2. Creating a record (either a data record, or a log record) can use built-in (or default) functionality in Oracle Forms *IF* you want this to happen in a database block.  If you want this in a control (non-database) block, that is also possible but then you have to write a program unit to do this, and explicitly call this program unit from something, maybe a when-button-pressed trigger, for example.

3. Posting a record to the database and committing are also both built-in (or default) functionality in Oracle Forms *IF* you want this to happen in a database block.  If you want this to happen in a control block, you have to write custom program units and/or triggers to make this happen.

4. I don't understand how you want to include "temporarily" with either posting a record to the database or committing.  You will have to explain what you mean by that.
I want save multiple records temporary but save after user want because this is approval form in which user can approve ,reject or back to lower  hierarrchy please give some example
Please give some example.its very urgent
Creating and saving multiple records in a control block will require a lot of code in manual triggers and/or program units.  Doing this work in Oracle Forms is much easier in a database block.

When you say "save multiple records temporary" we don't know exactly what you mean by that.  Usually a "save" (or commit) is permanent, not temporary.  A "post" action in Oracle Forms is temporary, and the results of that post are only visible to the user who did the post.  No other users can see these until a "commit" happens.  When the user who did the post does a commit, then the new records are visible to other users, and the data is permanent (at least until someone changes or deletes it.)

We also have no idea how approvals are handled in your application and database.  Are these just an update, that is changing a value from "N" to "Y" for example?  Or, must a new record be inserted to indicate that something else is now approved?

You have given us some general questions, but you haven't given us any specific information.  So, it is very difficult for us to give you specific examples when we know almost nothing about your database, your application and your business.
A r b are radio buttons onform
When we select a - approve more than one record we can approve but sometimes after approval a record not approved only remaining record would be commit
Please give some code
We still don't have nearly enough information from you.  

1. You told us that you have a two-block form, where one block is a database block and one block is a control.  Is that the form you are still talking about?

2. Now you tell us that buttons "A" and "B" are radio buttons on the form.  OK, but you did not tell us which block these are in.

3. This is very confusing: "When we select a - approve more than one record".  Does the user choose button "A" just once to approve multiple records?  This might be true if these buttons are in the control block.  Or, are these buttons in the database block, so the user must choose button "A" on multiple records to "approve more than one record"?

4. What does this mean: "but sometimes after approval a record not approved"?  How can it be not approved "after approval"?

5. What does this mean: "only remaining record would be commit[ed]"?  "Remaining record" from what?  Is that one remaining to be approved after some others are already approved?  What action should commit the "remaining record"?

No, we can't give you specific code when we don't understand your database, your application or your business.
One database block is tabular block in which radio button exists.
But radio buttons are non database item.second block is non database block in which log is created. User want to approve records through approve button  ,
1. "One database block is tabular block in which radio button exists."
OK, that is helpful information.

2. "radio buttons are non database item"
OK  But in Oracle Forms, that means when a users clicks one of these buttons, that doesn't automatically cause Oracle Forms to do anything, unless you have a WHEN-RADIO-CHANGED trigger.

3. "second block is non database block in which log is created"
I don't like this.  If you want this block to create records, I would say that it should be a database block.  But, If you understand Oracle Forms very well, and are good at writing a variety of Forms triggers, you may be able to make a non-database block work this way.

4. "User want to approve records through approve button."
What action do you want the form to do when the user chooses the "Approve" button?  Should the form insert a new record somewhere?  Should the form update the record in the database block?  If yes, which column must be changed and to what new value?  I can't give you the code to do this unless you give me the table name and at least the column name that should be updated.  

5. Do you want this "Approve" action to be committed (saved permanently) as soon as the user clicks this button *AND* independently of the default save/commit action of Oracle Forms?  Or, do you want this "Approve" action to just indicate to the form that this record in the database block has actually been changed by the user, and the form should update this record when the user chooses "Save" or "Commit"?
We use three tables one is used to check hierarchy in which. Three user to approve the payment  when first one is approve then approved records to second user then third.
OK, so there are always (or only sometimes?) three levels of approvals.  That helps a little bit.

Now, can you answer questions #4 and #5 in my previous post?
I have not found any solution please provide
We haven't seen your application.  We don't know what your business processes are.  We have no idea what your table and column names are,  So, if you can provide the information that I asked for in my questions #4 and #5 yesterday, we can try to provide a solution for you.

If you don't tell us how you want the form to work, I'm sorry, but we can't magically suggest some code for you when we have no idea what you want the code to do.  We understand that you want code to "approve" something.  But what does "approve" mean in your application and your database?  That is: how is "approval" indicated in your application or your database?
Give a query to populate recors at run time using default where claue
We have not received any sol till date can you give some example for that
“A query to populate records at runtime based on default where clause?”  That is what Oracle Forms does by default when you create a block based on a database table.

Do you have an existing form that you want to modify?  Or are you trying to create a new form?
Yes i have a form but we cant provide becoz it is official
Kindly provide a query with three tables .in which tables are related with two columns and populate record in tabular block
If you can give us your three table names and the columns names that are used to relate them, and if you indicate whether these are one-to-one or one-to-many relationships, we can give you a query to join them.  But, this is no different than writing any other three-table join query in Oracle.  If you have some Oracle experience, this should be fairly easy.  If you use that join query to create a view, you can then base an Oracle Forms block on that view and Oracle Forms will populate the records in a tabular block automatically.

We still do not understand if you have an existing form that you want to modify, or if you trying to create a new form.  If you cannot provide even some basic information about your application and your table names, we cannot provide you with specific suggestions.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.