Home » Developer & Programmer » Forms » A small problem, please help me out (merged threads)
A small problem, please help me out (merged threads) [message #127609] Tue, 12 July 2005 08:57 Go to next message
prase_pk
Messages: 40
Registered: July 2005
Location: india
Member
I got a problem when working with forms.I dont know much about forms but I am still in the learning stage.
"suppose I have a text item which is empty and during runtime if I want to access the value and then compare it at a later instance for some processing .what is the value that I get in runtime and what type of value it is? I have checked using debug mode to check the value but I cudnt find anything."

Anyone please tell me an answer.
please help me out [message #127611 is a reply to message #127609] Tue, 12 July 2005 09:09 Go to previous messageGo to next message
prase_pk
Messages: 40
Registered: July 2005
Location: india
Member
I am learning forms and I am trying to add a record in a table.
I gave add,delete and save buttons.

what I did is first I clear the form and then I enter values into the text items.Now when I press the add and save buttons
this has to be commited and the record is added to the table.But if I dont press the save button it should not be added.
Similarly only after i press the save button after delete it has to be deleted and commited.

I tried these built-in's:commit_form for save button,
create_record to add a new record in table.
delete_record to delete the record from table.

But when I give the create_record and then try to press save button there will be no values in the text items and I am unable to save it giving an error "no values".
Please help

Re: A small problem [message #127682 is a reply to message #127609] Tue, 12 July 2005 18:17 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
If it is empty then it is probably 'NULL'. Try using a NVL on the field when doing your compare.

David
Re: please help me out [message #127683 is a reply to message #127611] Tue, 12 July 2005 18:21 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I will assume that you are using forms 6i or 9i/10g.

Do NOT code your own triggers. Use the 'default&smartbar' as your menu (defined at form level). Use the wizards to create your block and canvas and everything will work quite nicely.

If in doubt, start again in a new module.

David

[Updated on: Tue, 12 July 2005 18:21]

Report message to a moderator

Re: A small problem [message #127703 is a reply to message #127682] Tue, 12 July 2005 23:50 Go to previous messageGo to next message
prase_pk
Messages: 40
Registered: July 2005
Location: india
Member
I tried checking it with NULL and since I debugged and watched for the values its showing nothing.So what can I give in the place of it?
Re: A small problem [message #127707 is a reply to message #127703] Tue, 12 July 2005 23:59 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Okay, I don't have enough information.

What version of Forms are you using?
How many blocks do you have?
On what tables are they based?
What do you want your form to do?
What do you mean by 'compare it at a later instance'?
Do you have a specification?
How many triggers have you written so far and what do they do?

David
Re: A small problem [message #127712 is a reply to message #127707] Wed, 13 July 2005 00:24 Go to previous messageGo to next message
prase_pk
Messages: 40
Registered: July 2005
Location: india
Member
I am using forms 9i and then I have used it to check the exit button I have defined.

scenario is something like this.Suppose I have 2 buttons and some text fields:
clear,exit.clear to clear the contents using clear_form and exit to exit using exit_form;Suppose I press clear and then exit.Its giving an error "No values in text fields" .But I dont want this.It has to exit even when there are no values in text fields.

help me
Re: please help me out [message #127713 is a reply to message #127683] Wed, 13 July 2005 00:26 Go to previous messageGo to next message
prase_pk
Messages: 40
Registered: July 2005
Location: india
Member
I am using forms9i and I know that this can be done using smart and menu bar but I want my personalization to be in the form Iam designing.So what to do and how to do?please help me.
Re: A small problem [message #127716 is a reply to message #127712] Wed, 13 July 2005 00:37 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Then you need to check the status of your form and either do an 'Exit_Form(NO_COMMIT, NO_ROLLBACK);' or an 'Exit_Form;' depending on the staus of your form.

Display the ':System.Form_Status' in your 'exit' button and tell me the result.

David
Re: A small problem [message #127732 is a reply to message #127716] Wed, 13 July 2005 01:22 Go to previous messageGo to next message
prase_pk
Messages: 40
Registered: July 2005
Location: india
Member
I checked for it .when there are some values in the text fields from the table then it is giving 'QUERY' and if I clear the contents then it is giving nothing and when I give some value it is giving 'CHANGED'.This is what I am able to get.

I have observed one more thing.When there are no values in the text fields,If I press any button ,it is giving the same error,this is what I want to wipe out of my form.
Re: A small problem [message #127739 is a reply to message #127732] Wed, 13 July 2005 01:37 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
You have to decide what you want to do with the information that you have keyed in and is causing the status to be 'CHANGED'. I suggest you do a commit_form to save your data and then do the exit_form to leave.

Read the documentation to check the parameters that you can use with the commit_form.

David

[Updated on: Wed, 13 July 2005 01:37]

Report message to a moderator

Previous Topic: Add a record in form
Next Topic: ifrun60.exe application error
Goto Forum:
  


Current Time: Thu Sep 19 20:27:33 CDT 2024