Fetch all names into multi row block
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I have tables that looks like this:
tbl1
+---------+
|c_no |
+---------+
|1 |
+---------+
tbl2
+----------+---------+
|tbl1_c_no |s_name |
+----------+---------+
|1 |A |
|1 |D |
+----------+---------+
My form:
◘ The 1st block's base table usage is tbl1.
◘ C_NO field is auto generated using sequence. (required).
◘ S_GR is just an unbound item. (not required).
◘ The 2nd block's base table usage is tbl2 and is multiple row.
◘ S_NAME. (required)
◘ 1st block is like the parent of 2nd block.
◘ 1st and 2nd block is linked using c_no and tbl1_c_no
For example if I wanted to add some data, it's like this:
Then press F10 for saving:
tbl1 will be:
+---------+
|c_no |
+---------+
|1 |
|2 |
+---------+
tbl2 will be:
+----------+---------+
|tbl1_c_no |s_name |
+----------+---------+
|1 |A |
|1 |D |
|2 |B |
|2 |C |
|2 |E |
+----------+---------+
And my problem is that I wanted to fetch s_names from my 3rd table into 2nd block.
tbl3
+----------+---------+
|s_gr |s_name |
+----------+---------+
|80 |F |
|85 |G |
|84 |H |
|84 |I |
|80 |J |
+----------+---------+
Like this:
then after leaving S_GR field, it will fetch S_NAME from tbl3 that S_GR = 80 into the 2nd block
oracle oracleforms
add a comment |
I have tables that looks like this:
tbl1
+---------+
|c_no |
+---------+
|1 |
+---------+
tbl2
+----------+---------+
|tbl1_c_no |s_name |
+----------+---------+
|1 |A |
|1 |D |
+----------+---------+
My form:
◘ The 1st block's base table usage is tbl1.
◘ C_NO field is auto generated using sequence. (required).
◘ S_GR is just an unbound item. (not required).
◘ The 2nd block's base table usage is tbl2 and is multiple row.
◘ S_NAME. (required)
◘ 1st block is like the parent of 2nd block.
◘ 1st and 2nd block is linked using c_no and tbl1_c_no
For example if I wanted to add some data, it's like this:
Then press F10 for saving:
tbl1 will be:
+---------+
|c_no |
+---------+
|1 |
|2 |
+---------+
tbl2 will be:
+----------+---------+
|tbl1_c_no |s_name |
+----------+---------+
|1 |A |
|1 |D |
|2 |B |
|2 |C |
|2 |E |
+----------+---------+
And my problem is that I wanted to fetch s_names from my 3rd table into 2nd block.
tbl3
+----------+---------+
|s_gr |s_name |
+----------+---------+
|80 |F |
|85 |G |
|84 |H |
|84 |I |
|80 |J |
+----------+---------+
Like this:
then after leaving S_GR field, it will fetch S_NAME from tbl3 that S_GR = 80 into the 2nd block
oracle oracleforms
add a comment |
I have tables that looks like this:
tbl1
+---------+
|c_no |
+---------+
|1 |
+---------+
tbl2
+----------+---------+
|tbl1_c_no |s_name |
+----------+---------+
|1 |A |
|1 |D |
+----------+---------+
My form:
◘ The 1st block's base table usage is tbl1.
◘ C_NO field is auto generated using sequence. (required).
◘ S_GR is just an unbound item. (not required).
◘ The 2nd block's base table usage is tbl2 and is multiple row.
◘ S_NAME. (required)
◘ 1st block is like the parent of 2nd block.
◘ 1st and 2nd block is linked using c_no and tbl1_c_no
For example if I wanted to add some data, it's like this:
Then press F10 for saving:
tbl1 will be:
+---------+
|c_no |
+---------+
|1 |
|2 |
+---------+
tbl2 will be:
+----------+---------+
|tbl1_c_no |s_name |
+----------+---------+
|1 |A |
|1 |D |
|2 |B |
|2 |C |
|2 |E |
+----------+---------+
And my problem is that I wanted to fetch s_names from my 3rd table into 2nd block.
tbl3
+----------+---------+
|s_gr |s_name |
+----------+---------+
|80 |F |
|85 |G |
|84 |H |
|84 |I |
|80 |J |
+----------+---------+
Like this:
then after leaving S_GR field, it will fetch S_NAME from tbl3 that S_GR = 80 into the 2nd block
oracle oracleforms
I have tables that looks like this:
tbl1
+---------+
|c_no |
+---------+
|1 |
+---------+
tbl2
+----------+---------+
|tbl1_c_no |s_name |
+----------+---------+
|1 |A |
|1 |D |
+----------+---------+
My form:
◘ The 1st block's base table usage is tbl1.
◘ C_NO field is auto generated using sequence. (required).
◘ S_GR is just an unbound item. (not required).
◘ The 2nd block's base table usage is tbl2 and is multiple row.
◘ S_NAME. (required)
◘ 1st block is like the parent of 2nd block.
◘ 1st and 2nd block is linked using c_no and tbl1_c_no
For example if I wanted to add some data, it's like this:
Then press F10 for saving:
tbl1 will be:
+---------+
|c_no |
+---------+
|1 |
|2 |
+---------+
tbl2 will be:
+----------+---------+
|tbl1_c_no |s_name |
+----------+---------+
|1 |A |
|1 |D |
|2 |B |
|2 |C |
|2 |E |
+----------+---------+
And my problem is that I wanted to fetch s_names from my 3rd table into 2nd block.
tbl3
+----------+---------+
|s_gr |s_name |
+----------+---------+
|80 |F |
|85 |G |
|84 |H |
|84 |I |
|80 |J |
+----------+---------+
Like this:
then after leaving S_GR field, it will fetch S_NAME from tbl3 that S_GR = 80 into the 2nd block
oracle oracleforms
oracle oracleforms
edited Jan 7 at 7:27
Miracle
asked Jan 3 at 8:25
MiracleMiracle
236123
236123
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You can create two blocks :
for the 1st one, to have a block with no base table, create manually just by touching
Data Blocks
node
with mouse's cursor and then toggling the create icon (a green plus
sign ) and type a nameblk_no
. And add a field s_no on the canvas.
for the 2nd one use
Data Block Wizard
and chooseTable or View type
for the type of the block. There select the table(tbl1)'s both columns
(s_no
andname
) asDatabase Items
.
And then, the forms must invoke
Layout Wizard
automatically as default, where choose onlyname
column
as displayed and leaves_no
hidden as to be . Name the block asblk_names
. This is a base-table block, andData Source Name
of the blockblk_names
is the table tbl1.
By the way, set
Number of Records Displayed
property to10
as an example, and convert the name of the fieldname
tosnames
as in your question.
Set block's WHERE Clause (in Database node) as
s_no = :blk_no.s_no
at the Property Palette. After
all, create aKEY-NEXT-ITEM
trigger ons_no
field with the inline
code :
go_block('blk_names');
execute_query;
At the runtime you can enter an integer value( let's give 1
as an example ) for s_no
and populate the names
field by pressing enter key
( the records with A
and D
will appear )
A button might be added with WHEN-BUTTON-PRESSED
trigger having the code :
go_block('blk_names');
delete tbl2;
first_record;
while :blk_names.s_no is not null
loop
insert into tbl2 values(:snames);
next_record;
end loop;
commit;
to populate and re-populate the table tbl2( in this case tbl2 is populated with the records A
and D
).
P.S. To suppress the message
FRM-40352: Last Record of Query retrieved
add an ON-MESSAGE
trigger at the forms level wtih the code :
if message_code = 40352 then
null;
end if;
I am very sorry sir. I forgot to mention something important in my question yesterday. I already edited it. Thanks.
– Miracle
Jan 4 at 0:39
@Miracle not important dear friend. I edited.
– Barbaros Özhan
Jan 4 at 5:22
1
@Miracle no, not problem. Consider applying the new answer.
– Barbaros Özhan
Jan 7 at 5:20
1
@Miracle no :) but I need to work harder for this daunting job.
– Barbaros Özhan
Jan 7 at 15:30
1
@Miracle you're very welcome dear friend.
– Barbaros Özhan
Jan 8 at 7:30
|
show 4 more comments
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54018655%2ffetch-all-names-into-multi-row-block%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can create two blocks :
for the 1st one, to have a block with no base table, create manually just by touching
Data Blocks
node
with mouse's cursor and then toggling the create icon (a green plus
sign ) and type a nameblk_no
. And add a field s_no on the canvas.
for the 2nd one use
Data Block Wizard
and chooseTable or View type
for the type of the block. There select the table(tbl1)'s both columns
(s_no
andname
) asDatabase Items
.
And then, the forms must invoke
Layout Wizard
automatically as default, where choose onlyname
column
as displayed and leaves_no
hidden as to be . Name the block asblk_names
. This is a base-table block, andData Source Name
of the blockblk_names
is the table tbl1.
By the way, set
Number of Records Displayed
property to10
as an example, and convert the name of the fieldname
tosnames
as in your question.
Set block's WHERE Clause (in Database node) as
s_no = :blk_no.s_no
at the Property Palette. After
all, create aKEY-NEXT-ITEM
trigger ons_no
field with the inline
code :
go_block('blk_names');
execute_query;
At the runtime you can enter an integer value( let's give 1
as an example ) for s_no
and populate the names
field by pressing enter key
( the records with A
and D
will appear )
A button might be added with WHEN-BUTTON-PRESSED
trigger having the code :
go_block('blk_names');
delete tbl2;
first_record;
while :blk_names.s_no is not null
loop
insert into tbl2 values(:snames);
next_record;
end loop;
commit;
to populate and re-populate the table tbl2( in this case tbl2 is populated with the records A
and D
).
P.S. To suppress the message
FRM-40352: Last Record of Query retrieved
add an ON-MESSAGE
trigger at the forms level wtih the code :
if message_code = 40352 then
null;
end if;
I am very sorry sir. I forgot to mention something important in my question yesterday. I already edited it. Thanks.
– Miracle
Jan 4 at 0:39
@Miracle not important dear friend. I edited.
– Barbaros Özhan
Jan 4 at 5:22
1
@Miracle no, not problem. Consider applying the new answer.
– Barbaros Özhan
Jan 7 at 5:20
1
@Miracle no :) but I need to work harder for this daunting job.
– Barbaros Özhan
Jan 7 at 15:30
1
@Miracle you're very welcome dear friend.
– Barbaros Özhan
Jan 8 at 7:30
|
show 4 more comments
You can create two blocks :
for the 1st one, to have a block with no base table, create manually just by touching
Data Blocks
node
with mouse's cursor and then toggling the create icon (a green plus
sign ) and type a nameblk_no
. And add a field s_no on the canvas.
for the 2nd one use
Data Block Wizard
and chooseTable or View type
for the type of the block. There select the table(tbl1)'s both columns
(s_no
andname
) asDatabase Items
.
And then, the forms must invoke
Layout Wizard
automatically as default, where choose onlyname
column
as displayed and leaves_no
hidden as to be . Name the block asblk_names
. This is a base-table block, andData Source Name
of the blockblk_names
is the table tbl1.
By the way, set
Number of Records Displayed
property to10
as an example, and convert the name of the fieldname
tosnames
as in your question.
Set block's WHERE Clause (in Database node) as
s_no = :blk_no.s_no
at the Property Palette. After
all, create aKEY-NEXT-ITEM
trigger ons_no
field with the inline
code :
go_block('blk_names');
execute_query;
At the runtime you can enter an integer value( let's give 1
as an example ) for s_no
and populate the names
field by pressing enter key
( the records with A
and D
will appear )
A button might be added with WHEN-BUTTON-PRESSED
trigger having the code :
go_block('blk_names');
delete tbl2;
first_record;
while :blk_names.s_no is not null
loop
insert into tbl2 values(:snames);
next_record;
end loop;
commit;
to populate and re-populate the table tbl2( in this case tbl2 is populated with the records A
and D
).
P.S. To suppress the message
FRM-40352: Last Record of Query retrieved
add an ON-MESSAGE
trigger at the forms level wtih the code :
if message_code = 40352 then
null;
end if;
I am very sorry sir. I forgot to mention something important in my question yesterday. I already edited it. Thanks.
– Miracle
Jan 4 at 0:39
@Miracle not important dear friend. I edited.
– Barbaros Özhan
Jan 4 at 5:22
1
@Miracle no, not problem. Consider applying the new answer.
– Barbaros Özhan
Jan 7 at 5:20
1
@Miracle no :) but I need to work harder for this daunting job.
– Barbaros Özhan
Jan 7 at 15:30
1
@Miracle you're very welcome dear friend.
– Barbaros Özhan
Jan 8 at 7:30
|
show 4 more comments
You can create two blocks :
for the 1st one, to have a block with no base table, create manually just by touching
Data Blocks
node
with mouse's cursor and then toggling the create icon (a green plus
sign ) and type a nameblk_no
. And add a field s_no on the canvas.
for the 2nd one use
Data Block Wizard
and chooseTable or View type
for the type of the block. There select the table(tbl1)'s both columns
(s_no
andname
) asDatabase Items
.
And then, the forms must invoke
Layout Wizard
automatically as default, where choose onlyname
column
as displayed and leaves_no
hidden as to be . Name the block asblk_names
. This is a base-table block, andData Source Name
of the blockblk_names
is the table tbl1.
By the way, set
Number of Records Displayed
property to10
as an example, and convert the name of the fieldname
tosnames
as in your question.
Set block's WHERE Clause (in Database node) as
s_no = :blk_no.s_no
at the Property Palette. After
all, create aKEY-NEXT-ITEM
trigger ons_no
field with the inline
code :
go_block('blk_names');
execute_query;
At the runtime you can enter an integer value( let's give 1
as an example ) for s_no
and populate the names
field by pressing enter key
( the records with A
and D
will appear )
A button might be added with WHEN-BUTTON-PRESSED
trigger having the code :
go_block('blk_names');
delete tbl2;
first_record;
while :blk_names.s_no is not null
loop
insert into tbl2 values(:snames);
next_record;
end loop;
commit;
to populate and re-populate the table tbl2( in this case tbl2 is populated with the records A
and D
).
P.S. To suppress the message
FRM-40352: Last Record of Query retrieved
add an ON-MESSAGE
trigger at the forms level wtih the code :
if message_code = 40352 then
null;
end if;
You can create two blocks :
for the 1st one, to have a block with no base table, create manually just by touching
Data Blocks
node
with mouse's cursor and then toggling the create icon (a green plus
sign ) and type a nameblk_no
. And add a field s_no on the canvas.
for the 2nd one use
Data Block Wizard
and chooseTable or View type
for the type of the block. There select the table(tbl1)'s both columns
(s_no
andname
) asDatabase Items
.
And then, the forms must invoke
Layout Wizard
automatically as default, where choose onlyname
column
as displayed and leaves_no
hidden as to be . Name the block asblk_names
. This is a base-table block, andData Source Name
of the blockblk_names
is the table tbl1.
By the way, set
Number of Records Displayed
property to10
as an example, and convert the name of the fieldname
tosnames
as in your question.
Set block's WHERE Clause (in Database node) as
s_no = :blk_no.s_no
at the Property Palette. After
all, create aKEY-NEXT-ITEM
trigger ons_no
field with the inline
code :
go_block('blk_names');
execute_query;
At the runtime you can enter an integer value( let's give 1
as an example ) for s_no
and populate the names
field by pressing enter key
( the records with A
and D
will appear )
A button might be added with WHEN-BUTTON-PRESSED
trigger having the code :
go_block('blk_names');
delete tbl2;
first_record;
while :blk_names.s_no is not null
loop
insert into tbl2 values(:snames);
next_record;
end loop;
commit;
to populate and re-populate the table tbl2( in this case tbl2 is populated with the records A
and D
).
P.S. To suppress the message
FRM-40352: Last Record of Query retrieved
add an ON-MESSAGE
trigger at the forms level wtih the code :
if message_code = 40352 then
null;
end if;
edited Jan 7 at 5:32
answered Jan 3 at 11:03


Barbaros ÖzhanBarbaros Özhan
14.9k71634
14.9k71634
I am very sorry sir. I forgot to mention something important in my question yesterday. I already edited it. Thanks.
– Miracle
Jan 4 at 0:39
@Miracle not important dear friend. I edited.
– Barbaros Özhan
Jan 4 at 5:22
1
@Miracle no, not problem. Consider applying the new answer.
– Barbaros Özhan
Jan 7 at 5:20
1
@Miracle no :) but I need to work harder for this daunting job.
– Barbaros Özhan
Jan 7 at 15:30
1
@Miracle you're very welcome dear friend.
– Barbaros Özhan
Jan 8 at 7:30
|
show 4 more comments
I am very sorry sir. I forgot to mention something important in my question yesterday. I already edited it. Thanks.
– Miracle
Jan 4 at 0:39
@Miracle not important dear friend. I edited.
– Barbaros Özhan
Jan 4 at 5:22
1
@Miracle no, not problem. Consider applying the new answer.
– Barbaros Özhan
Jan 7 at 5:20
1
@Miracle no :) but I need to work harder for this daunting job.
– Barbaros Özhan
Jan 7 at 15:30
1
@Miracle you're very welcome dear friend.
– Barbaros Özhan
Jan 8 at 7:30
I am very sorry sir. I forgot to mention something important in my question yesterday. I already edited it. Thanks.
– Miracle
Jan 4 at 0:39
I am very sorry sir. I forgot to mention something important in my question yesterday. I already edited it. Thanks.
– Miracle
Jan 4 at 0:39
@Miracle not important dear friend. I edited.
– Barbaros Özhan
Jan 4 at 5:22
@Miracle not important dear friend. I edited.
– Barbaros Özhan
Jan 4 at 5:22
1
1
@Miracle no, not problem. Consider applying the new answer.
– Barbaros Özhan
Jan 7 at 5:20
@Miracle no, not problem. Consider applying the new answer.
– Barbaros Özhan
Jan 7 at 5:20
1
1
@Miracle no :) but I need to work harder for this daunting job.
– Barbaros Özhan
Jan 7 at 15:30
@Miracle no :) but I need to work harder for this daunting job.
– Barbaros Özhan
Jan 7 at 15:30
1
1
@Miracle you're very welcome dear friend.
– Barbaros Özhan
Jan 8 at 7:30
@Miracle you're very welcome dear friend.
– Barbaros Özhan
Jan 8 at 7:30
|
show 4 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54018655%2ffetch-all-names-into-multi-row-block%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown