How to create a sharepoint list column that links to another list that is editable - sharepoint

I'm not sure if the title is a proper descriptor of what I'm trying to achieve here, hopefully it's close enough. I'm not a SharePoint expert, but I'm comfortable with creating forms and workflows as necessary to get something like this to work.
Basically, I need to have two separate SharePoint lists that are linked together, but one list needs to have row level security to hide data from other users that shouldn't see it. I need the column that is being linked to be an editable text box though, rather than a simple lookup field.
For example:
List A
Customer (text)
Description (text)
Sales People (person, multiple selections allowed)
Expenses (linked field)
List B
Customer (text)
Expenses (number)
Created by (just a reference that the sales people would actually "create" each row here)
Essentially, multiple people can be assigned to a customer in list a. The "sales people" are assigned by another user who actually creates the item for list a. I need to be able to have the people who are assigned as "sales people" to have a text box where they can enter their expenses, but on an individual basis, that would then be stored in list b with row level permissions to prevent them from seeing each others expenses totals.
List B would be able to show each sales person their full list of expenses across all the customers they are connected to, but not be able to see each others expenses. It's not a problem if the person creating the item for List A ends up with items in List B that are 0, but I need to be able to have the Expense field be an editable text box from a form that allows the sales people to enter their total expenses for that customer.
If I was building a custom application, this wouldn't be difficult to do, but I can't for the life of me figure out how to do this in SharePoint, or if it is even possible.

This is possible, but it will require custom development, using the SharePoint Object Model. Create your two lists and then you can either create a javascript/HTML based solution using libaries like jQuery and SPServices, or you can create a custom web part and use C# to update the lists. There's lot of examples out on the internet on how to do this. Write some code, and bring any problems you have with the code back to StackOverflow.

Related

Infopath Form to submit data to two sharepoint lists

Novice in Sharepoint and looking for some advise.
we are trying to setup a infopath form with the below fields.
ReqID (Autogenerated with a workflow based on ID like Req-1 etc.),
Description,
User,
Date,
Testing,
Tester,
Date
when the user submits the form, we would like to save the information to two separate lists on sharepoint like...
List A - ReqID, Description, User, Date
List B - ReqID, Description, Testing, Tester, Date
Can someone please advise if this is doable without using any coding.
Thank you so much for all the help.
Several possible solutions:
One list:
If it is a matter of hiding clutter from selected users then: create one list for all of the fields and then create two views, one with your first set of columns and the other with the second set of columns. This has the advantage of no duplication of data, and if you need to update the Description column, it only has to be done in one place.
Two lists:
From the InfoPath form, post all of the fields to the first list and create a View that only displays what's needed for the "A" users. Create a workflow that adds a new item to list "B" with only the data needed.
Three lists:
From the InfoPath form, post all of the fields to a master list. Create a workflow that copies selected fields to List A and to List B. This has the advantage of the master list being an unchanged source of the original data for audit or tracking purposes.
Using Web Services
I believe InfoPath can call web services. This will be more like "coding", but you can write data directly to SharePoint lists using SharePoint's REST API.

SharePoint Designer Workflow to conditionally make a copy of a list item

Good Afternoon,
I am working on an existing SharePoint List with a web enabled infopath form with multiple views, containing questions that are asked at differnt stages of a workflow.
On the very first stage when the list item is created, there is a question with multiple choice (check one). For example, Field Name = Fruits, with values, such as: Apples, Oranges, Cherries.
Later on in the worflow, the user is sent a reminder email, similar to a survey, where questions may look like "What did you think of them apples?
New request from the customer:
In the customers world, every apple eater also eats oranges, and they want also know what the user thinks of oragnes.
So, it sounds like I need to create a conditional worklow that creates a copy of the list item when it is first created, to include all of the initial field values, when Apples is selected, but change the fruit value to oranges in the duplicate.
Note: The survey reminder is set to create an email reminder when a new item is create in the list.
Using a SharePoint Designer 2013 Workflow, how can I do this?
I noticed that SP Designer will not let me use the "Create item in list (Output to Varialbe:Create)" if the list is the same list. I assume this is by design to not create some sort of infinate loop. I guess MS does not trust that I have a carefully planted condition to only run once, which is what I need your help with.
It feels like a crazy idea, but I am considering making a copy of my list, and using Create item in list (Output to Varialbe:Create) to make a copy of the list item in list 2, to set all value the same, with the exception of fruits, where I would change the value to oranges, and then somehow create a workflow in list #2, to copy the list item back to list #1.
Thoughts?
Thanks!

Create Excel Contact database

I would like to create a database based on the following reasoning:
I want to assign to each contact I have some tags for his abilities, for example, so there will be a column called "abilities". So I was thinking about creating a list of possible abilities (probably on a second sheet), lets say "play football", "cook", "ride a bike" and define that "Mike" can "play football.
For this to be useful I would also like to know how it is possible to be able to filter my contacts by ticking on the list of abilities I am looking for.
There are a couple of ways to tackle this.
1) Make a table that has contacts and abilities all together. This means that you will repeat the contact info if a person has multiple abilities. Each row will be the unique combination of contact + ability. If you want to limit the options for ability to specific choices, create your list of abilities and use data validation to create a drop-down list of these values in your abilities column.
2) Make 3 tables: 1-Contact, 2-Abilities, 3-Map of Contacts to Abilities (each row contains the unique identifier for a contact and the unique identifier for an ability). I'm not sure if you really intend to make a database or just something in Excel that works. If you can use PowerPivot, that would be a good solution without needing another application to create your db. Bring your 3 tables into PowerPivot. Create a relationship between table 3 and table 1. Create a relationship between table 3 and table 2.

SharePoint Advanced List Relations

Ok - so here's the preface. I realize that SharePoint isn't really the best solution for this, and if I have to use SharePoint, then coding this would be preferable. However, my wings are clipped due to IT policy, and they have no time to do this "for me".
I am developing a document control system for an Environmental Management System. The basic concept is that there is a list of 'General Responsibilities', which identifies a regulatory agency, some category info, links to laws, etc... There's a second list 'EMS Responsibilities', which basically just links (via a lookup) a particular site to a general responsibility, to identify which sites have which responsibilities. We have many sites, and most have most responsibilities so it doesn't make sense to combine the two lists and repeat all this stuff 10x. Finally, I have a document library (for simplicty sake I am ignoring the draft/published libraries aspect) which contains the actual documents. These documents should reference an EMS Responsibility, which in turn references a General Responsibility. The categorization from 'General Responsibilities' needs to propagate all the way to the document library.
Currently, I use workflow to automatically copy the secondary lookup columns referencing the 'General Responsibility' to a 'Single Line of Text' column in 'EMS Responsibilities' so that it is available to the lookup in 'EMS Documents'. However, despite the values being present in both responsibility lists, the values do not propagate to my final list.
This workflow-based approach is stupid. The lookup columns are stupid. There's no way to get this to work elegantly using out of the box components. I want to believe that the reason this isn't working is because I am missing something... but I have searched for hours and can't find any more effective relational capabilities.
First of all, any theories as to why the values do not end up in the final list despite referencing a single line of text column that is filled?
Second, is there a better overall approach that doesn't rely so much on workflows copying data back and forth, and these pathetic lookup columns?
Thanks in advance!
Given the requirements you gave above together with your answer to my question I believe you won't need a workflow to link all three items together. I have two options for you:
1st Option:
Create a General Responsibility list. This list should contain at least two columns. The ID and Title column.
Create an EMS Responsibilities list. This list should contain at least three columns. The ID, the Title column and a lookup column linked to the General Responsibility list.
Create a Document Library. Add a lookup column linked to EMS Responsibilities.
Since the lookup list you are using is already linked to General Responsibilities then there is no need to have another column solely dedicated to point to General Responsibilities. If however, you need to have specific columns in your document library so that it explicitly has columns for both General Responsibilities and EMS Responsibilities use option 2 below.
Option 2
Create a General Responsibility list. This list should at least contain the ID and Title column.
Create an EMS Responsibility list. This list should at least contain the ID, lookup column linked to General Responsibility and Title columns.
Create a document library. You should add two lookup columns. One pointing to General Responsibility the other to EMS Responsibility.
(now the fun part starts)
Follow the guide to edit both your NewForm and EditForm aspx in this link so that your lookup dropdowns will be a cascading dropdown. This will make sure that items from EMS dropdown will only be populated once you select a value from the General dropdown.
Let me know if you need any more clarifications.

Sharepoint: Person column in custom list

I have a Person field in my custom list. I want to have a view that will show multiple fields from that Person instead of the one I had to choose when creating the Person column.
So basically I want to have one column for Person and then in the view see Name, title, email, phone. All of those are valid choices but I can only pick one right now.
I really want to avoid typing in the username lookup for each column I choose to display.
This is SP 2007
It sounds like you need to create a custom fieldtype (with a fieldcontrol) that inherits from the userfield but in viewmode renders out the different columns you need. Is that something along the lines you are looking for?
http://www.sharepointblogs.com/nicksevens/archive/2007/08/31/create-custom-field-types-for-sharepoint.aspx
Note: This link is broken
You probably want a Computed Field. Note that this is not a Calculated Column. A Computed Field is what is used to display the same data is different ways. In SharePoint there is a Title field, but there is also a "Title (linked to item with edit menu)" computed field as well as a "Title (linked to item)" computed field.
See midway down this link for more details. I'm not sure if it will have all of the power that you need, but if it does it is almost certainly what you are looking for if you don't mind getting into the Schema XML file a little.
Could you use a DataView web part for this? If it's just a question of viewing the data that might be suitable.
Came across this thread and thought I'd add a tip. This suggestion is clearly not for every use case, but may work well in situations where you're managing a list rather than allowing manual inputs (verified to work with SP 2013):
Create a spreadsheet with columns to match your SharePoint list that contains multiple profile fields. (for example: name, phone number, email address)
In the spreadsheet, enter the same email address in all of the person/group field types in that row. (e.g., boss#company.com, boss#company.com, boss#company.com)
Select and copy the row(s) you wish to transfer to SharePoint.
In SharePoint, change the list view to "Quick Edit" and paste the row(s) into the grid.
SharePoint will process each field and convert the email address to the profile value you selected during the list setup.

Resources