Display columns based on the Choice from the Drop Down Menu in List - sharepoint-2010

I have a List with 7 columns.
Out of that I have a Gate column (Choice) which has 5 options (Design, Verification, ... )
My requirement is when i select each option based on the select it should show few more columns.
Ex: If i select Design from the Drop Down Menu (Gate Column) by default it should show all the other 6 columns and added to that it should show few other columns
New Column 1
When i select Verification it should display another set of columns (by default all the 6 columns should be displayed)
Note: All the 7 Columns (Including Gate Column) are standard and should be displayed for any of the 5 choices through the drop down menu from Gate Column
How this can be achieved.

Related

How to get rows depending on the "Total" Field using an Oracle SQL Query

I have 2 tables:
TABLE A
ID
DESCRIPTION
TOTAL
TABLE B
ID
DESCRIPTION
TOTAL
I use Delphi TcxGrid (GRID 1) to show all Table A rows, and I have another Grid (GRID 2) showing the Table B rows, When I select one row and double-click it in GRID1, a secondary window appears to ask the quantity to assign to the TABLE B, then the GRID 2 must show the row with the ID and the TOTAL typed by the user. Then I save the changes and the GRID1 must appear with the updated TOTAL = (TOTAL - Quantity typed).
NOTE: when the GRID 1 TOTAL of a row is 0, it has to disappear.
How can I afford that?
I've been trying with the MINUS Operator in the Query SQL that feeds the GRID 1 (TABLE A MINUS TABLE B), but it just doesn't show the row at the moment it's assigned to the GRID 2 (Table B)

Changing Row Source of a Lookup depending on another field

I'm trying to define the row source of a lookup field by selecting the table name from a separate lookup box.
The catalog of products comprises of about 41 Product Groups, which are then further divided into Types, some of which have over 100 types.
I have a table of Product Groups (41 groups), and I then have a separate table of Types for each Product Group (41 tables). All Type table names are exactly as they appear on the Product Group table. I want to be able to select the Product Group from a Lookup Box, and then select the Type from the corresponding table in a separate lookup box.
The images below should help give an idea of what I'm looking to do.
Set up of my first lookup box:
Set up of my second lookup:
Is this possible, and if so can anyone lend a hand ?
Thanks.
Just to summarize, you will need a single table with your TypeID, GroupID, and any other "Type" related fields.
Your Group ComboBox should have the ID field as its first column (makes the filtering much easier), So your control source should be:
SELECT [ProductGroup]![GroupID], [ProductGroup]![ProductGroup]
FROM [ProductGroup]
ORDER BY [ProductGroup];
Then in the properties for Group ComboBox on the Format tab make your column width 0";x" to hide the ID field.
The control source for the Type ComboBox should be:
SELECT [NewTypeTable]![TypeID], [NewTypeTable]![TypeName]
FROM [NewTypeTable]
WHERE [NewTypeTable]![GroupID] Like [Forms]![frmWithComboBoxName]![CboPGroup]
ORDER BY [NewTypeTable]![TypeName];
And again, if you want to hide the ID field, make the first column width 0".
You should also requery the second combobox in the afterUpdate() event of CboPGroup which will filter the second combobox based on the new selection in CboPGroup. The code (VBA) for that would be:
Forms!frmWithComboBoxName!CboType.Requery

Oracle forms - values not populated for undisplayed items in a data block

I have a simple data block which is based from 1 single database table.
Example:
Table T has 5 columns A,B,C,D and E.
I use two text fields in Control block(non-database data block) in which the user keys in the values for A and B and click on search button.
Based on A,B in the text boxes, I query from the table T and get A,B,C,D,E and store them in my data block while displayed only C,D and E. [Note here the query retrieves A,B,C,D and E although only C,D and E get displayed]
Below are what I did:
1) Using the data block wizard, imported all columns(A,B,C,D,E) from the table to the data block.
2) Using the Layout wizard, imported all but two columns(A,B) to be displayed on the canvas.
When I insert a record into the data block and do a COMMIT_FORM, the two columns that was left undisplayed([2] above) has a value of NULL populated for it.
My question is why does this happen and what should I do to have A and B also populated in the table when I do an insert?
If the values of A and B should be the one of the two textfields then you should set the inital value of A and B to the corresponding items. If you query 3 records and go add a 4th the inital value will fire and the will get the value required.

Select single row from database table with one field different and all other being same

I have a database table with 8 fields say Table(a,b,c,d,e,f,g,h).For some rows one of the field is different(say 4 different a values) while all other field values(b-h) in the schema are same.I have to make a table selecting just one rows from such rows with different a's but same b-h.That is I can select any one of the different a's and keep b-h same which they are and display it in table as 1 single row instead of 4.
SELECT MIN(a) a,b,c,d,e,f,g,h
FROM mytable
GROUP BY b,c,d,e,f,g,h

Display MemberPath instead of Value in WPF DataGrid

I have two SQL tables
In table 1 every row have value(string) in System Code column
In table 2 every row have value(int) in Device column which is ID of related Table 1 row.
Now i want to display Table 2 in WPF DataGrid and in Device Column value of System Code from Table 1. Now it's displaying ID of Table 1 row.
How can i do this?
Just create new class for the itmes, where you can store all needed properties. In your case it will be the projection of the join.
DataGrid's DisplayMemberPath relates only to the corresponding item. If data item which stands for representation of table's row allows naviagation to the property SystemCode of the Table1 then it is ok.