automatically fill field in sharepoint edit forms - sharepoint-2010

I have field that I want to automatize, I have department field is managed metadata, with different department, I want when I fill the editform, automatically , if department is IT then my field is NumIT0001 , the same for other department, have you any idea.
Thanks,

Use a workflow. On item submitted the workflow would start, check the value of IT department and then use an if condition to set the required field.

Related

How to create a dynamic LOV at runtime

How to create a dynamic attribute in lov at runtime?
Suppose I have a employee lov, where only two attributes are currently present like employee id and employee name.
It user want to add a few more column at run time like employee age and employee salary.
Without changing the LOV logic. The user has one master table where IT user can handle how many attribute should be displayed to business user. They can add a new parameter in table which can be displayed.
Can anybody suggest me some approach to handle this type of scenario?
If I got you right, I'd use backingBean with method that returns List, that implemented as ArrayList<SelectItem>. Then populate from any source(like VO, or whatever mixed) label and value according to your current user request.

How to add a figure to only a particular group in vb.net RDLC report

I have an RDLC report which sums totals for each group in VB.Net. It is working fine but what I want to do is to add a figure outside the group to only a particular group based on users selection.
Assuming there are three groups: Food Dept, Security Dept and Sales Dept. I want a figure 2000 to be added to only the Food Dept without affecting the Sales and Security Dept. Any help?
You can use an expression like this:
=Sum(Fields!ValueToSum.Value) + IIf(Fields!Departments.Value = "Food Dept", 2000, 0)
This is a simple example: use ReportParameters instead of constant ("Food Dept", 2000).
I would add a parameter and assign the value. An integer parameter for ex: #FoodDeptOffset can be added to the fields as
=Sum(Fields!FoodDept.Value) + (Parameters!FoodDeptOffset.Value)
Thanks A lot for the answers. I was able to sort it out by passing a parameter which did the trick. On the main form which loads the Reportviewer I attached A combo box giving the users an option to select which field the wanted to add to and the passed it as a parameter to the rdlc report.

SQL - Access 2010 partial duplicates match?

I'm working on an Access Database for everyday use in a team of 15.
Everyday the team will input 10-15 Names into this database and I need the database to see if the name already exists.
Easy enough, however some names don't match exactly.
For example the team will enter in this format into ONE field:
Lastname, Firstname
But the existing records that are imported from an automated report may have an initial at the end like:
Lastname, Firstname M.
This is enough to make the difference when using this query:
SELECT All_test.[Name], All_test.[EjSupervisor], All_test.[ID], All_test.[Department], All_test.[Location], All_test.[EbEmpNumber], All_test.[Date Manager E-mailed]
FROM All_test
WHERE (((All_test.[Name]) In (SELECT [Name] FROM [All_test] As Tmp
GROUP BY [Name],[EjSupervisor]
HAVING Count(*)>1 And [EjSupervisor] = [All_test].[EjSupervisor]))) and len(rtrim(Name) - 3)
Completely open to suggestions here.
"Everyday the team will input 10-15 Names into this database and I need the database to see if the name already exists."
For data input, give the users a form with a combo box which presents the existing names. They can then easily choose from among those names.
When they input a name which does not exist, Use NotInList Event to Add a Record to Combo Box.

Color the calender list field

I have a calender list in sharepoint 2010 and my requirement is
when a user from a particular deparment takes a leave then that users leave will be highlighted by a color(and the department column is a look up field(i have created a department list and there iam having 2 column department and color))
and how to do this by xsl and also by client side script.
This can be achieved by OOB. Create views for the field or c and do calendar overlays.

what editable control should i use to display my spreadsheet in a vb.net application?

I have a spreadsheet in excel with three headers:
Project Name
The name of a project i'm working on.
Requested Role
The job title/profession of the project employee. (example: mechanic, manager, engineer)
Name
The name of the employee.
When i click on the Person's name i want another page or tab (specific to this person) to appear showing details about them such as their name, job title, how long they worked, what project they are doing... etc. (similar to a Facebook profile)
When i click on the project name i want another page or tab (specific to this project) to appear showing details about it such as the requirements, the deadline, who is currently working on it... etc.
Furthermore, i would like to set up two levels of access:
Managers:
People who can add new information but not change or delete existing information
(write-only permissions)
Administrators:
People who can have full access to all information.
All highest level of access.
I don't know how i would go about displaying and/or organizing so much information in a vb.net application. if anyone could provide some suggestions as to some possible layouts of the GUI it would be greatly appreciated!
Additional Details:
For the specific pages i was thinking of using the tab control but i want it so that i can search through the list of projects or names, select one, and then it brings up the page about it.
The levels of access is the least of my worries... although it is still a worry.
You don't want to store that information in an excel spreadsheet, a database is much, much better. For what you've described here I'm going to assume that you have Projects and Employees, and that multiple Employees can work on a project. You'll need a few tables then:
Project
ProjectSeq 'Int - unique sequence for this project record
Name 'String - name of project
Descr 'String - description of project
... 'Various - other fields as needed
Employee
EmployeeSeq 'Int - unique sequence for this employee record
Name 'String - Name of employee
Title 'String - Job title of this employee
IsManager 'Boolean - Is this employee a manager?
IsAdmin 'Boolean - Is this employee an administrator?
... 'Various - other fields as needed
ProjEmpl
ProjEmplSeq 'Int - unique sequence for this project-employee record
ProjSeq 'Int - link to project record
EmployeeSeq 'Int - link to employee record
... 'Various - other fields that apply to this project-employee combination
Once you have your tables all set up and populated with data, you'll want to read the data and transfer it to your .NET application. There are a few ways of doing this, you'll have to decide which works best for your needs. I'm a big fan of DataSets, they always work nicely.
To fill the grid, you'll need to use a sql statement that fills a datatable from the three tables (I'm using notepad as my IDE, so this may not be exact):
SELECT pe.*, p.Name as ProjName, e.Name as EmplName, e.Title
FROM ProjEmpl pe, Project p, Employee e
WHERE p.ProjectSeq = pe.ProjectSeq AND
e.EmployeeSeq = pe.EmployeeSeq
To display the data to the end user, you would use a DataGridView control. Set the datagrid.DataSource to use the datatable you just populated and the data should show up.
To display the related Employee & Project information, I'd use a tab control underneath the datagrid. One tab for Project, and one tab for Employee. Use individual controls for each field in the table. When the user changes rows in the datagrid, load the related Project and Employee information for that row into two datatables and populate the controls from that.
Lastly, to set permissions on the program you'll need to have the employee log onto the application. Once they've logged on you can look them up in the Employee table, find out if they are a manager or an administrator, and set the permissions accordingly.