Home » Developer & Programmer » Forms » WHEN-BUTTON-PRESSED
WHEN-BUTTON-PRESSED [message #553930] Wed, 09 May 2012 06:10 Go to next message
nmdevorah
Messages: 6
Registered: May 2012
Location: Islamabad
Junior Member
Dear All I have a form of a user feedback with SMS Sending. which I gave to my all clients when ever my any client enter a feedback they press send SMS button so I got SMS if they press the button 2 times I got 2 same sms and if press the button 3 times I got 3 same sms and so on I want to restrict them and allow them to send only 2 sms of that feedback.
Please let me know any method on WHEN-BUTTON-PRESSED Trigger

Thanks

Cheers
Re: WHEN-BUTTON-PRESSED [message #553931 is a reply to message #553930] Wed, 09 May 2012 06:13 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Create a counter (either an item, a parameter or a global variable (a parameter would be my choice)). Increment it when the button is pressed. Check its value in a WHEN-BUTTON-PRESSED trigger and do nothing (or raise an alert) when it is above the limit.
Re: WHEN-BUTTON-PRESSED [message #553936 is a reply to message #553931] Wed, 09 May 2012 06:26 Go to previous messageGo to next message
nmdevorah
Messages: 6
Registered: May 2012
Location: Islamabad
Junior Member
If... If... If You Don't Mind Please Give any Example.

Thanks in advance

Cheers
Re: WHEN-BUTTON-PRESSED [message #553937 is a reply to message #553936] Wed, 09 May 2012 06:29 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Parameter is created in Object Navigator; should be a number.

Trigger:
:parameter.counter := nvl(:parameter.counter, 0) + 1;
if :parameter.counter > 2 then
   message('No more SMS');
   raise form_trigger_failure;
else
   <your SMS sending code goes here>
end if;
Re: WHEN-BUTTON-PRESSED [message #553940 is a reply to message #553937] Wed, 09 May 2012 06:49 Go to previous messageGo to next message
nmdevorah
Messages: 6
Registered: May 2012
Location: Islamabad
Junior Member
You are a Genius Men


Thank you very very very much. Smile

Re: WHEN-BUTTON-PRESSED [message #554034 is a reply to message #553940] Wed, 09 May 2012 23:15 Go to previous messageGo to next message
nmdevorah
Messages: 6
Registered: May 2012
Location: Islamabad
Junior Member
Sad again i have a problem
Re: WHEN-BUTTON-PRESSED [message #554036 is a reply to message #554034] Wed, 09 May 2012 23:26 Go to previous messageGo to next message
nmdevorah
Messages: 6
Registered: May 2012
Location: Islamabad
Junior Member
I receive multiple Feedbacks daily
i want to get all Feedbacks sms twise
but
following method send only 2 SMS from whole Feedbacks(Module)
----------------------------------------------------------------
:parameter.counter := nvl(:parameter.counter, 0) + 1;
if :parameter.counter > 2 then
message('No more SMS');
raise form_trigger_failure;
else
<your SMS sending code goes here>
end if;
-------------------------------------------------------

what i want is i want all feedback sms twise


any one can help Neutral
Re: WHEN-BUTTON-PRESSED [message #554038 is a reply to message #554036] Thu, 10 May 2012 00:00 Go to previous message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm not sure I understand the question. Could you attach a screenshot of your form (with some data) and describe what it does?
Previous Topic: Change Item_Item at Run time
Next Topic: Scrollbar is not working properly....
Goto Forum:
  


Current Time: Fri Jul 05 21:56:52 CDT 2024