SharePoint List tables - sharepoint

I'm working on a project for work, and I'm attempting to move data from a database with multiple references to different tables.
My question is; is it possible to move the data and be able to have a list that references different lists? For example, when I click on an element in the list, can I create another "link" to take me to another list?

I am not sure but if I understand the problem well You would like to create some kind of column in one list which will store reference to item from other list, correct?
If so then You are looking for lookup columns. When adding column to a list You may select lookup column type, after that You need to select which list You would like to 'reference' and which column should be present from the second list in the lookup column from the first list. Please check the reference link

OOB lookup column(similar concept as database foreign key) will be good, while CSR will be helpful for complex scenario also.

Related

Share point unique values

Can you please suggest how to check the unique values from entire share point site to avoid duplicates records. I was able to find only for a list with option "Enforce unique values" so that i have enabled this it not allows duplicate record in that list. is there any way to compare in all the lists?
"Enforce unique values" setting is based on a list or library column.
Then I create a site column and set it to "Yes",test if this could avoid duplicate records of this column in all lists:
However, this will only limit the values on one list or library. If multiple lists use the same site column and fill in the same value, nothing happens.
So there is no such way to enforce unique values in all lists.

Incorrect data being pulled from a SharePoint list to Power BI

When I pull data from a SharePoint list into Power BI, the values are pulled incorrectly for columns having the data type -
Person or Group - instead of names, numerical values are pulled. I guess these are the IDs of the values
Lookup - instead of the actual values, '[list]' is pulled in a nested column. When I expand, numerical values are shown. Again, seems like IDs
All other data types are pulled properly.
To work around this problem, I first pull the data from the list to Excel and then to PBI. However, I want to eliminate this manual step as the list will have frequent updates and I will need to pull the list data into Power BI regularly.
What should be done to pull the actual values as they appear in the list?
For the lookup columns: You need to pull in the lists where the lookup values are being looked up from and then create a relationship based on ID.
For the People: Look here:fully explained how to deal with Person object
I did some looking around and was able to find a solution.
Using the FieldValuesAsText column in the Query Editor, I got the values in the table. values for both column types were available. Since, I only needed the text values it solved the purpose.

Sharepoint 2010 Exclusive columns?

Does anyone know a way to have two columns in a SP2010 list that are exclusive? I need to ensure that there is only a value for ONE column, not both.
Basically I need the following structure:
Category List ->
SubCategory List (with a lookup to Category) ->
Value (with a lookup to SubCategory).
But, if there is no SubCategory, use a lookup to Category. One or the other must be used, not both.
Using either a list Event Receiver (SPItemEventReceiver) or a Custom Workflow should be able to achieve these desired semantics.
I do not believe the model itself can represent such relationships. An alternative might be to have different content types, for which only one of the columns applies (to each).
Happy coding.

Display column from one Sharepoint list into another list

I have one Sharepoint list that contains training courses and duration (in hours). I have another list where users can enter the training they have and plan to take (using a Lookup column connected to the first list)
Is there a way I can bring over that Hours column to display on the second list? I only have access to the vanilla web parts and SPD, and I am not allowed to add third-party stuff (solutions/web parts) on the SP servers.
I just need that Hours column to appear in the list itself without users needing to click the lookup field (course title)
If you have multiple column field type and you use that as lookup field. You can get two column values in one field. It will show up as two different columns on list but you will need render templates for input forms. Check this out for basic idea
http://msdn.microsoft.com/en-us/magazine/dd727508.aspx#id0450138
Create a field type for course list
Create render template for MCV and extend SPFieldMultiColumnValue
Make that field as Lookup Column
You have to check if you can do second step using SPD only. Also another way to do it is using Multiple column lookup field
HTH

Can I create a COUNTIF calculated column in SharePoint?

Is there a way to create a SharePoint calculated column that returns a count of the number of entries in a list? So If I have 3 customers in my list with the company "Starbucks" I'd like the field to return "3"
(Edited some wording for clarity per suggestion from dariom).
You may be able to get what you want with another list using a not-so-well-known variation of a lookup column.
Let's say you have a list called Companies with values in the title column like "Starbucks", "Peets", etc. Now you also have the Customers list you refer to, but the "Company" column is a lookup column pointing to the title column in the Companies list.
You can add a count very similar to what you described to your Companies list. Go to your Companies list, add a column of type "Lookup" referring to the Customers list and you'll notice that in the drop-down area where you define the lookup if you point back to the Customers list, you'll have a new option called "Count Related". This is here automatically because it recognizes that the Customers list has a lookup pointing back to this one. Select that Count Related option and now your Companies list will have a column counting how many customers are associated with that company.
No coding, Javascript hacks, or anything. Just hidden SharePoint auto-magic.
No, I don't think there's a way to do this using the out-of-the-box calculated column.
Some other ways you could accomplish this are:
Create a view for your list that with a group by on the company field and include the total count. This is easiest, but might not be exactly what you're looking for.
Create a custom column type that executes a CAML query to find items that you're interested in. There is a learning curve if you've not done it before and if the list that you're adding this custom column to has lots of rows, you'll be executing a query for each row which is inefficient - it'll be OK for a small number of rows.
Use an event handler on the list that updates a column value each time a new item is added or removed from a list. This is easier, but can also be inefficient if you have a large number of items in your list.
As dariom said (damn my slow typing skills, +1!), only the current row can be operated on with calculated columns by default in SharePoint. There are a couple of documented workarounds involving SharePoint Designer or jQuery, though.
You can get a Count of specific list items in an XSLT Data View
To do this you will need SharePoint Designer.
Right click on your SharePoint List view (ensure the list view contains the field you want to filter by) select convert to XSLT Data View. Then in the Data Source Windows select Data Source Tab and drag and drop the field you want to get a total on for the specific items into where you want it displayed in your XSLT Data View. Click on the numerical value that is showing you should get a lightening bolt icon, select the drop down and choose Count, then select again and choose Filter. Select "Click here to add a new clause" then choose your field name again and enter your unique value as Starbucks and click OK, you can repeat this process for other fields you want the totals on. You will now see the total number of Starbucks items in the list.
I got something similar to work in a way similar to Niall. Basically, I:
Based on the source list, created a Data View Web Part (DVWP) on a "test" web
part page.
Added the footer column, which gives a count.
Set the filter for my conditions (i.e., the items I want to count).
In the code, deleted the recurring items row.
I was left with just the footer, which displayed a filtered count for all the list items. I further customized the footer by taking out the shaded background. Finally, I exported this web part and imported it onto the page where I wanted users to see a total of items in the list (which met the criteria).

Resources