Home » Developer & Programmer » Forms » if Hiredate > 01-jan-09 then go_block('emp') (database 10g, Developer 6I, Window XP)
if Hiredate > 01-jan-09 then go_block('emp') [message #389089] Fri, 27 February 2009 04:27 Go to next message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
Hellow All


i have a question in my mind that if i create a block which not relate to any database table i only make one button in that block now i need when i press the button its check that if emp table hiredate = or greater then 1-jan-09 then go block emp other wise give me message that not yet any entry found in emp table


Hope you guys understand


Thanks


Shahzaib Ismail
Re: if Hiredate > 01-jan-09 then go_block('emp') [message #389092 is a reply to message #389089] Fri, 27 February 2009 04:34 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
And what is preventing you from writing code to do that?
Re: if Hiredate > 01-jan-09 then go_block('emp') [message #389101 is a reply to message #389089] Fri, 27 February 2009 05:03 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
if
emp.hiredate > '01-jan-09' then
open_form('F:\project\fabric inventory\finv.fmx');
end if;


table view or sequense reference emp.hiredate not allow in this context



there is no text item in block only one button is in block


so any idea


Thanks


Shahzaib ismail
Re: if Hiredate > 01-jan-09 then go_block('emp') [message #389116 is a reply to message #389089] Fri, 27 February 2009 05:48 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
So you're refering to the hiredate column of the emp table in the database?

Then you'd have to write a SELECT statement to check it's value(s).
Re: if Hiredate > 01-jan-09 then go_block('emp') [message #389134 is a reply to message #389089] Fri, 27 February 2009 06:28 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
Please provide my detail information you mean to create a text item and then select hiredate into :Text_item then right the triger

or you have any other idea

Please explain


Thanks


Shahzaib ismail
Re: if Hiredate > 01-jan-09 then go_block('emp') [message #389169 is a reply to message #389089] Fri, 27 February 2009 08:23 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Maybe?

You haven't explained what you want to do clearly enough for me to help you further.

All I know is what to do a check on emp.hiredate and based on that do a go_block.

I can't tell you what the query should look like becuase you haven't told me what it should do.
I can't tell you what to do with the value it'd select because you haven't told me what you want to do with it.
Re: if Hiredate > 01-jan-09 then go_block('emp') [message #389172 is a reply to message #389089] Fri, 27 February 2009 08:43 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
Thanks for your reply


i want to show you all of my requirement basically i made one block which is login block there is 2 text box User and Pass and i create 2 button 1 is OK and 2nd is Cancel

in ok button i create trigger when button press

if
:user='Shahzaib' or
:user='SHAHZAIB' then
if :pass ='KSE' or
:pass='kse'
then
new_form('c:\inventory.fmx')
else
message ('Invalid password');
message ('Invalid password');
end if;
else
message ('Invalid User');
message ('Invalid User');
end if;

for example the inventory relate to emp block where we can insert update and delete emp record

now i when i press the button of ok it will check that emp.hiredate > '01-jan-09' then open
new_form('c:\User.fmx');

other wise open inventory.fmx

Hope i clear you my requirement

Any way


Thanks

Shahzaib
Re: if Hiredate > 01-jan-09 then go_block('emp') [message #389176 is a reply to message #389089] Fri, 27 February 2009 09:00 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
*sigh*

No that really isn't much clearer at all.

Which emp.hiredate do you want to check?

I assume there's more than one record in the emp table.
Do you want to check all the records?
Some of the records?
One record in particular?
Re: if Hiredate > 01-jan-09 then go_block('emp') [message #389184 is a reply to message #389089] Fri, 27 February 2009 09:32 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
i want to check all record any record which hiredate is above then 01-jan-09 then trigger fire


Re: if Hiredate > 01-jan-09 then go_block('emp') [message #389187 is a reply to message #389092] Fri, 27 February 2009 09:42 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
shahzaib_4vip@hotmail.com wrote on Fri, 27 February 2009 15:32

i want to check all record any record which hiredate is above then 01-jan-09 then trigger fire



cookiemonster wrote on Fri, 27 February 2009 10:34
And what is preventing you from writing code to do that?


After all that's a REALLY basic select.

Also - what trigger fire? This'd be code you put in a trigger wouldn't it?
Re: if Hiredate > 01-jan-09 then go_block('emp') [message #389218 is a reply to message #389089] Fri, 27 February 2009 11:40 Go to previous message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
Thanks for your help cookiemonster


i done it



Shahzaib
Previous Topic: Datablock based on multiple tables join
Next Topic: Oracle Form : navigational problem in data block
Goto Forum:
  


Current Time: Fri Sep 20 12:27:31 CDT 2024