Maximum no of rows in a list block [message #425229] |
Thu, 08 October 2009 02:59 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
thalheim
Messages: 5 Registered: October 2009
|
Junior Member |
|
|
I wonder if anyone can help...
I have 2 blocks on my canvas b_top and b_list. "Header" info is inserted into b_top and "detail" info is inserted into b_list, by the user (it is not a select from a DB!). The detail info can range from 1 row to, well, infinity (in theory) and will hold a numeric value.
e.g. 3 "detail" rows (numeric value and description are separate fields)
2 cabbages.
3 carrots.
2 onions.
Thus, I wish to loop through the rows and for each row "internally loop" against the numeric value. So (in the example above) I end up with DB rows...
Cabbage
Cabbage
Carrot
Carrot
Carrot
Onion
Onion
The "internal loop" is easy, as I have the numeric value to work against (ie, 2 cabbages). However, looping through the rows is proving more difficult. I've been trying, something along the lines of...
Go_block('b_list');
First_record;
While "vegetable" is not null loop
...
"Internal loop"
...
Next_record;
End loop;
What would be nice would be able to know how many rows are in b_list, so I could use that to loop against (ie, whilst current_row < max_no_of_rows).
Yet, I can find no way to determine max_no_of_rows. Any suggestions?
|
|
|
|
Re: Maximum no of rows in a list block [message #425246 is a reply to message #425233] |
Thu, 08 October 2009 04:21 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
thalheim
Messages: 5 Registered: October 2009
|
Junior Member |
|
|
Cheers for the feedback Omar. I'm new to forms [can you tell ], have had no handover, with no other developer to bounce ideas off and am fumbling in the dark (somewhat). I've used Powerbuilder and other GUI development type tools in the past; some of which is relevant; some of which is not - ha ha!
Anyhow, I have tried your suggestion... and now get a "frm-40106 no navigable items in destination block" - which, I believe is triggered by next_record.
Yet, ALL items on b_list are text items, navigable, visible, enabled etc, etc. (which is the implication on another thread).
|
|
|
|
|
Re: Maximum no of rows in a list block [message #425417 is a reply to message #425358] |
Fri, 09 October 2009 01:55 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
thalheim
Messages: 5 Registered: October 2009
|
Junior Member |
|
|
Sure... I've used Oracle in the past (PL\SQL, Stored Procs etc)... and, as you say, it's "usually right". Though there are one or two interesting, how should I put it... err, features lol.
For this, I guess it's the little nuances of Forms that I'm missing (it'll come!)... I have been modifiying the properties, displaying, enabling (and vice versa) items etc, so that the user may not progress further forward than they should do (and yes, i've been looking at another thread that you have commented on littlefoot)... I'm convinced that all the items on b_list are active, accessible, enabled etc, etc, before I'm trying to perform the nested loops (because how else would the user be able to enter the data). But something strange still happens... the tabbing ability between one item and another within b_list doesn't function, I imagine programatically I have to force the navigation... but it seems like a lot of work, when all you wish to do is hide or show an item. [For example, within Powerbuilder you can hide or show "items" and yet their functionality (behind the scenes) remains exactly the same - so that you don't have to code around the nuances.]
Anyhow, I have modified the logic of the form... and have got it working; it's not how I would want it to be, but it functions (and sometimes that's good enough!).
Thanks for the feedback chaps... I shall try to chip in with contributions to the site. Take it easy...
|
|
|
|
|
|