List box in data block
Hi,
I have trouble implementing a form that uses 2 master table. I tried using the one suggested here
http://www.oracle.com/technetwork/developer-tools/forms/documentation/blockonajoin-131860.pdf
but doesn't seem to support the specification I want.
I have 2 tables say EMP and DEP, with the DML target table being EMP.
But I also want to display the DEP.NO ( = EMP.DEP_NO) plus the DEP.NAME(which should disabled for change) but the field should be combo/list box
This is so when I insert a new data, I can just select from the combo box field(which should be populated with all the possible values from DEP.NO in the DEP table). And when I select the DEP.NO, the DEP.NAME will automatically show. But if you just want to UPDATE, DEP.NO should be disabled (only ones from EMP table is enabled for CHANGE.)...
Appreciate any suggestions.
Thanks!
Based on your description, you actually have just one master table and the second table is being used for reference only as it simply supplies the DEPT_NO and DESCRIPTION based on the DEPT_NO on the EMP record. There is no need to a block based on a join in this situation. Just create a data block based on the EMP table and populate your List Item (Poplist) using the value from the DEPT table.
Do you really need to see the DEPT_NO of the department or will the department name stored in the DESCRIPTION column be enough? A Poplist will only display one value, typically the description of the underlying code (DEPT_NO). If your Department Poplist is attached to the EMP.DEPT_NO column in your form the description will automatically be displayed for the underlying EMP.DEPT_NO. If a user changes the Department using the Poplist the underlying EMP.DEPT_NO will receive the associated DEPT_NO and Forms will record a change has been made.
When a new record is created, the Department Poplist will be NULL until your user selects a department from the list.
This should satisfy your requirement!
Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly.
Similar Messages
-
Pre pouplating selectone list box with data
hello friends, im very new to jsf programming
I have one requrement like this.
In one jsp page there are many select boxes (jSF components).
and there is one backing bean corresponding to that jsp page.
I want to pre populate the select boxes with the data, from the database.
I dont know howand where to set the values to these select boxes.
please help me friends.
Thanks in advance.You can pre-propulate the bean anytime before you attempt to build the page (on which the select boxes are on).
Use an action method, action listener, or even the beans constructor to populate the bean.
There are a few other times/ways you can pre-populate the bean, but they are more special cases.
Most people will use the beans constructor. It's the simplest and most straight forward way (plus, that's what a constructor is for... populating your Object with defaults). You can make your DB calls from within the constructor.
CowKing -
Data Concurrency and Consistency ( SCN , DATA block)
Hi guys, i am getting very very very confused about how oracle implement consistency / multiversioning with regards to SCN in a data block and transaction list in the data block..
I will list out what i know so you guys can gauge me on where i am..
When a SELECT statement is issued, SCN for the select query is determined. Then Blocks with higher SCN are rebuilt from the RBS.
Q1) The SCN in the block implied here - is it different from the SCNs in the transaction list of the block ? where is this SCN store ? where is the transaction list store ? how is the SCN of the block related with the SCNs in the transaction list of the block ?
Q2) can someone tell me what happen to the BLOCK SCN and the transaction list
of the BLOCK when a transaction start to update to a row in the block occurs.
Q3) If the BLOCK SCN reflects the latest change made to the block and If the SCN of the block is higher then the SCN of the SELECT query, it means that the block has change since the start of the SELECT query, but it DOESNT mean that the row (data) that the SELECT query requires has changed.
Therefore why cant ORACLE just check to see whether the row has changed and if it has, rebuilt a block from the RBS ?
Q4) when ORACLE compares the BLOCK SCN, does it only SCAN for the BLOCK SCN or does it also SEARCH through the TRANSACTION LIST ? or it does both ? and why ?
Q5) is transaction SCN same as Transaction ID ? which is store in the RBS , the transaction SCN or ID ?
Q6) in short i am confuse with the relationship between BLOCK SCN, transaction list SCN, their location, their usage and relationship of the BLOCK SCN and transaction list when doing a SELECT, their link with RBS..
any gurus clear to give me a clearer view of what is actually happening ?Hi Aman
Hmm agreed.So when commit is issued , what happens at that time?Simply put:
- The SCN for the transaction is determined.
- The transaction is marked as committed in the undo header (the commit SCN is also stored in the undo header).
- If fast cleanout takes place, the commit SCN is also stored in the ITL. If not, the ITL (i.e. the modified data blocks) are not modified.
So at commit, Oracle will replace the begin scn in the ITL with this scn
and this will tell that the block is finally committed is it?The ITL does not contain the begin SCN. The undo header (specifically the transaction table) contains it.
I lost here.In the ITL , the scn is transaction SCN or commit scn?As I just wrote, the ITL contains (if the cleanout occured) the commit SCN.
This sounds like high RBA information?What is RBA?
Commit SCNThis is the SCN associated with a committed transaction.
Begin SCNThis is the SCN at which a transaction started.
Transaction SCNAs I wrote, IMO, this is the same as the commit SCN.
Also please explain that what exactly the ITL stores?If you print an ITL slot, you see the following information:
BBED> print ktbbhitl[0]
struct ktbbhitl[0], 24 bytes @44
struct ktbitxid, 8 bytes @44
ub2 kxidusn @44 0x0009
ub2 kxidslt @46 0x002e
ub4 kxidsqn @48 0x0000fe77
struct ktbituba, 8 bytes @52
ub4 kubadba @52 0x00800249
ub2 kubaseq @56 0x3ed6
ub1 kubarec @58 0x4e
ub2 ktbitflg @60 0x2045 (KTBFUPB)
union _ktbitun, 2 bytes @62
b2 _ktbitfsc @62 0
ub2 _ktbitwrp @62 0x0000
ub4 ktbitbas @64 0x06f4c2a3- ktbitxid --> XID, the transaction holding the ITL slot
- ktbituba --> UBA, used to locate the undo information
- ktbitflg --> flags (active, committed, cleaned out, ...)
- _ktbitfsc --> free space generated by this transaction in this block
- _ktbitwrp+ktbitbas --> commit SCN
HTH
Chris -
Counting number of records in a data block
hi folks,
Simple question for you guys: How can I count number of records in a data block.
In other words, say I have 10 detail records listed on a data block (one of my columns is a non-database item for entering a number). Now I just want to do somethin like:
Select count(*) From <data_block> into lnRecCount
Where <non-database column> <> 0 ;
Can I do this in a button trigger? I can't get it to work?
Thanks,
bobYou should make a routine that go through records of the block and count the records that agree with your condition.
-
Can we create a list item as a data block item?
Hi,
I have changed a text item to list item on the data block.
This list item used to get populated when it was control block item, but after i changed it to data block item, it's not getting populated.
My question is, can we create a list item(poplist) as a data block item?
Any idea?
Thanks in advance
R.GHi
When you use ctl blocks data dose not fetch from Database. But in data blocks it get fetches when you execute query. So you have to make sure table column values are matching with the List Box values you have given.
So please check table values.
Nilaksha. -
Creating "Control Combo Box " Relation with data block
Hi all dears
i am switching from C# to oracle developer for joining gulf net software house, i have a problem regarding master detail data
the senerio is
"List items" control Filled programatically as under shortly:-
rg_id := create_group_from_query('myrg', 'select dname a, dname b from dept');
populate_group(rg_id);
populate_list('mylist', rg_id);
using this i fill my combo box during new form instance trigger
i have created a datablock emp through wizard which can show 10 record.
now
Problem 1
i want to show records on form when user select any dept from combo box.
Problem 2
if i create group from query and in select statement is like this "select dname, dpetno from dept" the record group is created successfully but i am unable to populate_list due to different data type colums in record group how i will populate list so that List items Labels are department name and value is department no
Thanks in advance for persualHi dears all
I have solved this problem my self
1. select dept name form combo box and the data block shows the emp's of concern depat
solution
create a data block of emp table through wizard
create its table view and show 10 records
go to datablock i consider its name "emp" datablock properties
in Where clause condition specify deptno = : my_combo_box;
now go to combo box when item changed event
go_bolck("emp);
execute_query; -
Hope someone can help. I have tried to find the best way to do this and can't seem to make sense of anything. I'm using an Access 2013 Database and I have a report that is based on a query. I've created a Report Criteria Form. I
need the user to be able to select multiple items in a list box and also to enter a Begin Date and End Date. I then need my report to return only the records that meet all selected criteria. It works fine with a ComboBox and 1 selection but can't
get it to work with a List Box so they can select multiple items. Any help is greatly appreciated while I still have hair left.The query should return all records.
Let's say you have the following controls on your report criteria form:
txtStart: text box, formatted as a date.
txtEnd: text box, formatted as a date.
lbxMulti: multi-select list box.
cmdOpenReport: command button used to open the report.
The text boxes are used to filter the date/time field DateField, and the list box to filter the number field SomeField.
The report to be opened is rptReport.
The On Click event procedure for the command button could look like this:
Private Sub cmdOpenReport_Click()
Dim strWhere As String
Dim strIn As String
Dim varItm As Variant
On Error GoTo ErrHandler
If Not IsNull(Me.txtStart) Then
strWhere = strWhere & " AND [DateField]>=#" & Format(Me.txtStart, "yyyy-mm-dd") & "#"
End If
If Not IsNull(Me.txtEnd) Then
strWhere = strWhere & " AND [DateField]<=#" & Format(Me.txtEnd, "yyyy-mm-dd") & "#"
End If
For Each varItm In Me.lbxMulti.ItemsSelected
strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
Next varItm
If strIn <> "" Then
' Remove initial comma
strIn = Mid(strIn, 2)
strWhere = strWhere & " AND [SomeField] In (" & strWhere & ")"
End If
If strWhere <> "" Then
' Remove initial " AND "
strWhere = Mid(strWhere, 6)
End If
DoCmd.OpenReport ReportName:="rptMyReport", View:=acViewPreview, WhereCondition:=strWhere
Exit Sub
ErrHandler:
If Err = 2501 Then
' Report cancelled - ignore
Else
MsgBox Err.Description, vbExclamation
End If
End Sub
If SomeField is a text field instead of a number field, change the line
strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
to
strIn = strIn & "," & Chr(34) & Me.lbxMulti.ItemData(varItm) & Chr(34)
Regards, Hans Vogelaar (http://www.eileenslounge.com) -
How to add data into a List box
CS3 SDk:Windows<br /><br />Hi all,<br />I am trying to add data into a basic List box in CS3??<br /><br />// .fr<br />GenericPanelWidget<br /> (<br /> // CControlView properties<br /> kInvalidWidgetID, // widget ID<br /> kPMRsrcID_None, // PMRsrc ID<br /> kBindNone, // frame binding<br /> Frame(0,0,250,90) // left, top, right, bottom<br /> kTrue, // visible<br /> kTrue, // enabled<br /> // GroupPanelAttributes properties<br /> "", // header widget ID<br /> { <br /> <br /> WidgetListBoxWidgetN<br /> (<br /> kWFPListBoxWidgetID, kSysListBoxPMRsrcId, // WidgetId,RsrcId<br /> kBindAll, // Frame binding<br /> Frame(0,0,250,90) // Frame<br /> kTrue, kTrue, // Visible, Enabled<br /> 1,0, // List dimensions<br /> 19, // Cell height<br /> 1, // Border width<br /> kFalse,kTrue, // Has scroll bar (h,v)<br /> kTrue, // Multiselection<br /> kTrue, // List items can be reordered<br /> kTrue, // Draggable to new/delete buttons<br /> kFalse, // Drag/Dropable to other windows<br /> kTrue, // An item always has to be selected<br /> kFalse,// Don't notify on reselect<br /> kFalse, <br /> { <br /> } <br /> <br />),<br />},<br />),<br /><br />//-------ID.h--------<br />DECLARE_PMID(kWidgetIDSpace, kWFPListBoxWidgetID, kWFPPrefix + 2)<br /><br />//observer.cpp-----------WFPDialogObserver::Update<br /><br />//get currently selected/active widget <br />WidgetID theSelectedWidget = controlView->GetWidgetID();<br /><br />// ist it the text edit field? <br />if (theSelectedWidget == kWFPInsertButtonWidgetID && theChange == kTrueStateMessage) <br />{ <br /><br />IControlView* listBox = panelControlData->FindWidget(kWFPListBoxWidgetID);<br /><br />InterfacePtr<IListControlData> listControlData(listBox, UseDefaultIID()); <br /><br />//Insert the string into listbox <br />PMString strText = dialogCtrl->GetTextControlData(kWFPTextEditBoxWidgetID); <br /><br />// obviously there can't be a translation for text entered by user <br />strText.SetTranslatable(kFalse);<br />listControlData->Add(strText,kWFPTextEditBoxWidgetID); <br />dialogCtrl->SetTextControlData(kWFPTextEditBoxWidgetID, ""); <br />break; <br /><br />I am not able to Add items into list box.<br /><br />I tried based on Discussion <br />http://www.adobeforums.com/webx/.3bc43877<br /><br />but not able to locate SDKListBoxHelper file .it is not available in SDK.<br /><br />Please ,<br />Tell me Where I am going wrong.<br /><br />Thanks,<br />Adil
resource VSPDialogWidget (kSDKDefDialogResourceID + index_enUS)
__FILE__,
__LINE__,
kVSPDialogWidgetID, // WidgetID
kPMRsrcID_None, // RsrcID
kBindNone, // Binding
Frame(5,0,491,266) // Frame (l,t,r,b)
kTrue,
kTrue, // Visible, Enabled
kVSPDialogTitleKey, // Dialog name
DefaultButtonWidget
kOKButtonWidgetID, // WidgetID
kSysButtonPMRsrcId, // RsrcID
kBindNone, // Binding
Frame(9,234,89,254) // Frame (l,t,r,b)
kTrue,
kTrue, // Visible, Enabled
kSDKDefOKButtonApplicationKey, // Button text
CancelButtonWidget
kCancelButton_WidgetID, // WidgetID
kSysButtonPMRsrcId, // RsrcID
kBindNone, // Binding
Frame(394,234,474,254) // Frame (l,t,r,b)
kTrue,
kTrue, // Visible, Enabled
kSDKDefCancelButtonApplicationKey, // Button name
kTrue, // Change to Reset on option-click.
WLBCmpListBox //Tree view
kWLBCmpListBoxWidgetID, kPMRsrcID_None, // WidgetId, RsrcId
kBindAll, // Frame binding
Frame(299,49,475,170) // Frame
kTrue, kTrue, // Visible, Enabled
kTrue, // EraseBeforeDraw
kInterfacePaletteFill, // InterfaceColor
kHideRootNode | kDrawEndLine, // Options. Display root node
kFalse, // Use H Scroll bar
kTrue, // Use V scroll bar
20, // fVScrollButtonIncrement
20, // fVThumbScrollIncrement
0, // fHScrollButtonIncrement
0, // fHThumbScrollIncrement
2, // Items selectable, 0 = No Selection, 1 = Single Selection, 2 = Multiple Selection
kFalse, // Allow children from multiple parents to be selected
kTrue, // Allow discontiguous selection
//The tree view is dynamically created.
// added to support the list elements in the list box
resource LocaleIndex (kWLBCmpListElementRsrcID)
kViewRsrcType,
kWildFS, k_Wild, kWLBCmpListElementRsrcID + index_enUS
resource WLBCmpNodeWidget (kWLBCmpListElementRsrcID + index_enUS)
__FILE__, __LINE__,
kWLBCmpListParentWidgetId, kPMRsrcID_None, // WidgetId, RsrcId
kBindLeft | kBindRight, // Frame binding
Frame(0, 0, 194, 20), // Frame
kTrue, kTrue, // Visible, Enabled
"", // Panel name
// Just a info-static text widget with about-box text view to get white bg.
WLBCmpTextWidget
kWLBCmpTextWidgetID, kPMRsrcID_None, // WidgetId, RsrcId
kBindLeft | kBindRight, // Frame binding
Frame(45,1,194,18) // Frame
kTrue, kTrue, kAlignLeft,kEllipsizeEnd // Visible, Enabled, Ellipsize style
"", // Initial text
0, // Associated widget for focus
kPaletteWindowSystemScriptFontId, // default font
kPaletteWindowSystemScriptHiliteFontId, // for highlight state.
If you still got problems, post you email here - I'll send you the complete project/code then.
-Marc -
I am currently creating a list box on a selection screen. I have created the box, but I am unable to populate it with data. After looking through many resources and several threads through this forum I am still unable to populate it. I have followed syntax posted on this forum and others, yet my list box still remains empty. I am using the call function 'VRM_SET_VALUES' and doing the proper exports, I have used TYPE-POOL: TRM, and have created the data declaration. Yet the box remains empty. Anything I should look for to correct this problem?
Hi,
Here is the simple Program
REPORT ZLIST.
TYPE-POOLS: VRM.
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST.
PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
NAME = 'PS_PARM'.
VALUE-KEY = '1'.
VALUE-TEXT = 'LINE 1'.
APPEND VALUE TO LIST. VALUE-KEY = '2'.
VALUE-TEXT = 'LINE 2'.
APPEND VALUE TO LIST.
CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
START-OF-SELECTION.
WRITE: / 'PARAMETER:', PS_PARM.
Regards
Sudheer -
What is the data type of the value returned by the List box prompt in crystal
Post Author: Mudit Kothiyal
CA Forum: Formula
Hi all,
I am creating a report which has a list box prompt. When I am selecting a single value from the list box the report is working fine, but when I am selecting multiple values its not returning any data( although data is there). Does anyone know how the prompt values are passed to the report query by the crystal. I kno it passes the value to the report as an array. But how does it pass the value to the report query.
I am using command query to fetch data from the DB.
Crystal Report Version: Crystal Report XI R2.
DB: Oracle 10g
Also does anyone know how to pass the values of the list box prompt to the report query in comma seperated format.
Thanks & regards,
MuditPost Author: rcoleman
CA Forum: Formula
In regards to the latter part of your question
The following examples are applicable to Basic and Crystal syntax.
The examples assume that list is a String array consisting of the 3 elements: "Chocolate", "Vanilla" and "Strawberry".
Join (list)
Returns the String "Chocolate Vanilla Strawberry".
Join (list, "***")
Returns the String "Chocolate**Vanilla**Strawberry".
Not sure about the first part of your question,sorry. -
How to send a data from combobox to list box in java when I click datas
ow to send a data from combobox to list box in java when I click datas in combobox
use getItemAt() from combo and add them to list model.
-
Please help !!!! How to get data into dropdown list box
Hi all,
I want to display data from ResultSet object to drop down
list box in my JSP form.
How should I proceed ?
Please help me what should I do ?
Thanks for any help in advance.
savdeep.dear hermione
it depends on the compexity of the application
i could also have suggested to use a JSP custom tag
that can populate the values stored in a table. I
guess u must have used that approach too.
But why to make the things complicated when they can
be done in an easier manner.
The author seems to be a beginner and telling him to
call Helper classes just to make a drop down is not
at all feasible.
what do u say?I believe it is best to start with a proper approach than finding quick solutions. Of course, JSTL sql tags allow you to execute queries within the JSP but they look cleaner in code.
Certainly, if the OP is a beginner in JSP (presuming that he has some background of core Java and OOP), I don't see any reason why there should not be a separate class with a well-defined responsibility. This will help the OP develop a thinking towards designing a good solution rather than simply patching in bits of procedural code to get the job done. There is a difference in doing something and doing in properly. :)
I suppose I am a little wary since I have been working too long maintaining code developed by others. A simple change in the requirement needs a lot of impact on several components. -
How to insert data to the specified row column of the multi column list box
Hi All
How do i insert data into the specified column of the multi cplumn list box?
I have a table that containsall station nos and name.Then another table contains the data the various stations having at for 24 hrs.That is 12 am to 11 pm.
And i want to display each stations details as follows using a multi column list box/table
My stationinfo table
stnno stnname......................
s1 stn1
s2 stn2
s3 stn3
The other table
stnno sysdatetime data
s1 12am 1
s2 12am 4
s1 1 am 2
So the station s1,s2.... will have data for 24 hrs.
And i want to display it as follows using a multicolumn listbox
stnname 12am 1 am ......................................11pm
s1 ...................
s2 ........................
What i have in my mind is to get all station nos
and in a for loop get the station's data from 12 am to 11 pm
or
select every statios data for each hor.But in this case i have to query the database 24 times.So i dont think its a good way.
Or any other better query available?
Can anybody suggest me a good idea?
One more thing...how to insert data into the specified field row or column of a multi column list box?
Thanks in advancehi
i want to know,,can u say ur need clearly...and i attached two image u see that one
Indrajit
| [email protected] | [email protected] .
Attachments:
station.JPG 35 KB
station2.JPG 79 KB -
Using LDAP data to populate list box
Hi All,
I have set up my authentication scheme reading the company LDAP using the dn string etc.
I have created a table which holds all the staff details ( email etc ) but would like to have this data read directly from LDAP at login time or when required. The data ( username, email address, phone number and known-as credentials ) should be able to be used to populate list boxes.
Any ideas ?
Thanks - Robert @ london govHi Robert,
The following thread might help give you a few ideas -
Re: Cookie And LDAP
I use that method to query my LDAP server and also use a materialized view (with timed refreshes) to be able to query information quicker than querying the LDAP server each time. -
Declaring constant data in a list box - Dialog programming
i need to declarare some constant data 1...4 in list box in dialog programming i have done some coding its not working here is the code, can you plz tell me whats wrong in the code non of the values are displaying in drop downbox.
type-pools vrm.
DATA: name TYPE vrm_id,
list TYPE vrm_values,
value LIKE LINE OF list.
clear list.
REFRESH LIST.
value-key = '1'.
value-text = 'Sales & Distribution'.
append value to list.
value-key = '2'.
value-text = 'Material Management'.
append value to list.
value-key = '3'.
value-text = 'Finance & Controlling'.
append value to list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'LISTBOX1'
values = list
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.I think your code is correct onlybut the problem may be where
you are passing the internal table to the FM 'VRM_SET_VALUES' ...
Try to use the following code..
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'LISTBOX1'
values = list[]
Maybe you are looking for
-
How can I import iPhone contacts into Mac Address book
I recently purchased a MacBook Pro and am in the process of trying to dump my Windows PC. All of my important contacts are on my iPhone. How can I get those contacts into my Mac Address Book? The same question goes for the music (ripped from CD) and
-
Is OWA_PATTERN in Oracle SE?
Dear Sirs: I'm in doubt! I've looked through the OWA_PATTERN package which is a part of PL/SQL Toolkit. I like it very much and I really need it! But my team leader requests to make our code to be able running on Oracle Standard Edition (so our custo
-
OBIEE Answers - default formats
Hi there, I'm looking for a way to customize the default formats of requests in Answers. Currently when I create a new request the font sizes / font colours / background colours etc of the column headings are not consistent and I end up with differen
-
How do I set up the efax for my HP Photosmart 5510 series? I cannot find the directions anywhere.
-
I enter keywords on import and may use the same keyword multiple times. When I twirl open the keyword HUD I have to re-move the keyword into the "folder" I created that already has the keyword in it. It gives me a move keyword warning and then asks i