Home » Developer & Programmer » Forms » 2 question plsss (forms 6i)
2 question plsss [message #474278] Sat, 04 September 2010 09:53 Go to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
how to generate this auto matic serial in Tlist like example attaching

  • Attachment: untitled.PNG
    (Size: 6.55KB, Downloaded 614 times)
Re: 2 question plsss [message #474483 is a reply to message #474278] Mon, 06 September 2010 13:08 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
pls answer of this questions

Re: 2 question plsss [message #474584 is a reply to message #474483] Tue, 07 September 2010 06:54 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
can anyone answer of this question how to generate auto serial no. in tilist when i click scroll down it should automatically

1 2 3 4 5 6 7

Re: 2 question plsss [message #474585 is a reply to message #474584] Tue, 07 September 2010 06:57 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
You could use a row generator query:
SQL> select rownum counter from dual connect by level < 10;

   COUNTER
----------
         1
         2
         3
         4
         5
         6
         7
         8
         9

9 rows selected.

SQL> 
Re: 2 question plsss [message #474586 is a reply to message #474585] Tue, 07 September 2010 07:06 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
it will work in TILIST FIELD NO NEED FOR ADD_LIST_ELEMENT
OR ANYTHING ELSE CAN U GIVE SOME WITH TLIST EXAMPLE
Re: 2 question plsss [message #474587 is a reply to message #474586] Tue, 07 September 2010 07:16 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
1) Do not post in caps! It is considered shouting and goes against the forum guidelines which you should read.
2) Why not just populate it from a record group using my query?
Re: 2 question plsss [message #474608 is a reply to message #474587] Tue, 07 September 2010 09:14 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
thanks for reply i will try it and sorry for using caps lock


Re: 2 question plsss [message #474610 is a reply to message #474608] Tue, 07 September 2010 09:33 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
its working fine but pls can u check this example fmb file
i want to remove this connect level i want only when i click down scroll serial should increase no need for set level

pls correct this fmb file


thansk
Re: 2 question plsss [message #474611 is a reply to message #474610] Tue, 07 September 2010 09:39 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
sorry for forgot attached fmb file here is the fmb file

--and here is code which put on button

declare
cursor c1 is select rownum counter from dual connect by level <10;
begin
clear_list('list1');
for rec in c1 loop
add_list_element('list1',c1%rowcount +1, rec.counter,rec.counter );
end loop;
end;

  • Attachment: sample.fmb
    (Size: 44.00KB, Downloaded 1004 times)
Re: 2 question plsss [message #474613 is a reply to message #474611] Tue, 07 September 2010 09:51 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
To my knowledge all list items work off a fixed set of values. You can't get them to increase with no limit.
If you want to do that you're going to have a create a fake tlist - a text item and two buttons.
Re: 2 question plsss [message #474631 is a reply to message #474613] Tue, 07 September 2010 13:24 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
owais_baba
when i click down scroll serial should increase no need for set level

Well, how far should those numbers go? What is the final limit? If you are storing the value into a numeric datatype column, then column's size is the limit (for example, into a NUMBER(4) column you can store values up to 9999). Therefore, Cookiemonster's suggestion looks promising.
Re: 2 question plsss [message #474761 is a reply to message #474631] Wed, 08 September 2010 12:08 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
sir thanks for your knowledgable information and thanks for helping me a lot yes your right but i have done this thing with some other way


thanks again
Re: 2 question plsss [message #474777 is a reply to message #474761] Wed, 08 September 2010 15:38 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What "other way"?
Re: 2 question plsss [message #474778 is a reply to message #474777] Wed, 08 September 2010 16:04 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
sure sir what i did

when-new-form i put this code

declare
a number(5) ;
begin
select count(*)+1 into :global.a from description;
:floors := :global.a;
end;

then i took 2 iconic buttons which is looks like a scroll bar
then i put this code

button-pressed-->down

begin
:global.a := :global.a+1;
--next_record;
:floors := :global.a;
end;

begin
:global.a := :global.a-1;
--next_record;
:floors := :global.a;
end;

button-pressed-->up

like this my work has done how ever i wanted

but i really thankful to u for helping me a lot

"png attached"

thanks again











  • Attachment: done.PNG
    (Size: 5.87KB, Downloaded 600 times)
Re: 2 question plsss [message #474796 is a reply to message #474778] Thu, 09 September 2010 00:57 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I see; however: this *might* be OK as long as your application is a single-user application. Once there are two (or more) of them, it will break because all of them will work with the same set of numbers (until someone performs COMMIT and changes contents of the "description" table.

Also, note that GLOBAL variables (":global.a" in your case) are of a CHARACTER datatype. ":global.a + 1" requires Oracle to perform implicit datatype conversion. So, perhaps you should consider converting character to a number first (TO_NUMBER(:global.a)).
Re: 2 question plsss [message #476752 is a reply to message #474796] Sat, 25 September 2010 07:51 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
sorry for late reply i was a sick and thanks for precious information


Re: 2 question plsss [message #476754 is a reply to message #476752] Sat, 25 September 2010 08:24 Go to previous message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
let me clear one thing sir this application has 5 tab canvases and primary is ID and i am controlling multiuser app. with

when-create-record and pre-insert trigger but it was really precious information which u have given to me


thanks again
Previous Topic: Can Oracle forms 11g connect to DB2 or SQL Server?
Next Topic: single datablocks used in multiple frame
Goto Forum:
  


Current Time: Thu Sep 19 12:52:29 CDT 2024